Changeset 11159:07b6db67859c in orange


Ignore:
Timestamp:
10/26/12 14:42:33 (18 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Fixed selection when left clicking on a node.

Location:
Orange/OrangeCanvas
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/canvas/scene.py

    r11151 r11159  
    635635        # Else simply return and let customContextMenuReqested signal 
    636636        # handle it 
    637         shape_item = self.item_at(event.pos(), items.NodeItem) 
     637        shape_item = self.item_at(event.scenePos(), items.NodeItem) 
    638638        if shape_item and event.button() == Qt.RightButton and \ 
    639639                shape_item.flags() & QGraphicsItem.ItemIsSelectable: 
  • Orange/OrangeCanvas/document/interactions.py

    r11153 r11159  
    482482        self.initial_selection = None 
    483483        self.rect_item.hide() 
    484         self.scene.removeItem(self.rect_item) 
     484        if self.rect_item.scene() is not None: 
     485            self.scene.removeItem(self.rect_item) 
    485486        UserInteraction.end(self) 
    486487 
  • Orange/OrangeCanvas/document/schemeedit.py

    r11156 r11159  
    117117        scene = CanvasScene() 
    118118        view = CanvasView(scene) 
     119        view.setFrameStyle(CanvasView.NoFrame) 
    119120        view.setRenderHint(QPainter.Antialiasing) 
    120121        view.setContextMenuPolicy(Qt.CustomContextMenu) 
Note: See TracChangeset for help on using the changeset viewer.