selectOnButtonMenu - start menu also on already selected elements (until now only
authorab
Thu, 27 Mar 2008 15:33:49 +0100
changeset 3380 d1290de3de27
parent 3379 060bb2feff4b
child 3381 7451912f2aae
selectOnButtonMenu - start menu also on already selected elements (until now only if selection was changed)
SelectionInListModelView.st
--- a/SelectionInListModelView.st	Thu Mar 27 15:30:34 2008 +0100
+++ b/SelectionInListModelView.st	Thu Mar 27 15:33:49 2008 +0100
@@ -1249,14 +1249,15 @@
     sensor := self sensor.
     lineNr := self yVisibleToLineNr:y.
 
-    ((button == 2) or:[button == #menu]) ifTrue:[
+    ((button == 2) or:[button == #menu]) ifTrue:[ 
         selectOnButtonMenu ifTrue:[
             (     lineNr notNil
-             and:[lineNr ~~ self selectedIndex
-             and:[self canSelectIndex:lineNr forAdd:false ]]
+             and:[self canSelectIndex:lineNr forAdd:false ]
             ) ifTrue:[
-                (self selectWithoutScroll:lineNr redraw:true) ifTrue:[
-                    self selectionChanged
+                (lineNr ~~ self selectedIndex) ifTrue: [
+                    (self selectWithoutScroll:lineNr redraw:true) ifTrue:[
+                        self selectionChanged
+                    ].
                 ].
                 item := self selectedElement.
             ] ifFalse:[
@@ -1323,9 +1324,8 @@
             buttonMotionAction := 
                 [:p|
                     ((x@y) dist:p) > dragDistance ifTrue:[
-                        (self startDragAt:p) notifyEndOfDropAction:[
-                            self selectAndUpdateModelWithoutChangeNotification: oldSelection.
-                        ].
+                        self startDragAt:p.
+                        self selectAndUpdateModelWithoutChangeNotification: oldSelection.
                     ].
                 ].
 
@@ -2486,5 +2486,5 @@
 !SelectionInListModelView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInListModelView.st,v 1.126 2008-03-25 10:08:16 ab Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInListModelView.st,v 1.127 2008-03-27 14:33:49 ab Exp $'
 ! !