Ignore:
Timestamp:
04/03/12 16:40:21 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
rebase_source:
2ae51ed1d44008a82763aec61b7e16a59f471765
Message:

Don't call QGraphicsView.mousePressEvent when doing manual widget selection (it re-toggles selected widget when control modifier key is pressed).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/orngView.py

    r9671 r10731  
    233233        # we clicked on a widget or on a line 
    234234        else: 
    235             if type(activeItem) == orngCanvasItems.CanvasWidget:        # if we clicked on a widget 
     235            if type(activeItem) == orngCanvasItems.CanvasWidget: 
     236                # if we clicked on a widget 
    236237                self.tempWidget = activeItem 
    237238 
    238239                if ev.button() == Qt.LeftButton: 
    239240                    self.bWidgetDragging = True 
    240                     if ev.modifiers() & Qt.ControlModifier: #self.doc.ctrlPressed: 
     241                    if ev.modifiers() & Qt.ControlModifier: 
    241242                        activeItem.setSelected(not activeItem.isSelected()) 
    242243                    elif activeItem.isSelected() == 0: 
     
    254255                    activeItem.setSelected(True) 
    255256                    self.doc.canvasDlg.widgetPopup.popup(ev.globalPos()) 
    256                     return # Don't call QGraphicsView.mousePressEvent. It unselects the active item 
    257257                else: 
    258258                    self.unselectAllWidgets() 
     259                return # Don't call QGraphicsView.mousePressEvent. It unselects the active item 
    259260 
    260261            # if we right clicked on a line we show a popup menu 
Note: See TracChangeset for help on using the changeset viewer.