Commits

Aleš Erjavec committed abfeb50

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

  • Participants
  • Parent commits 61fcb88

Comments (0)

Files changed (1)

File Orange/OrangeCanvas/orngView.py

 
         # we clicked on a widget or on a line
         else:
-            if type(activeItem) == orngCanvasItems.CanvasWidget:        # if we clicked on a widget
+            if type(activeItem) == orngCanvasItems.CanvasWidget:
+                # if we clicked on a widget
                 self.tempWidget = activeItem
 
                 if ev.button() == Qt.LeftButton:
                     self.bWidgetDragging = True
-                    if ev.modifiers() & Qt.ControlModifier: #self.doc.ctrlPressed:
+                    if ev.modifiers() & Qt.ControlModifier:
                         activeItem.setSelected(not activeItem.isSelected())
                     elif activeItem.isSelected() == 0:
                         self.unselectAllWidgets()
                         self.unselectAllWidgets() 
                     activeItem.setSelected(True)
                     self.doc.canvasDlg.widgetPopup.popup(ev.globalPos())
-                    return # Don't call QGraphicsView.mousePressEvent. It unselects the active item
                 else:
                     self.unselectAllWidgets()
+                return # Don't call QGraphicsView.mousePressEvent. It unselects the active item
 
             # if we right clicked on a line we show a popup menu
             elif type(activeItem) == orngCanvasItems.CanvasLine and ev.button() == Qt.RightButton: