DSVColumnView.st
changeset 5902 1ad98b113571
parent 5896 7ffd5257eaa0
child 5952 059e5ddd60f3
--- a/DSVColumnView.st	Wed Aug 29 17:24:52 2018 +0200
+++ b/DSVColumnView.st	Tue Sep 11 17:45:16 2018 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1997 by Claus Gittinger / eXept Software AG
               All Rights Reserved
@@ -4826,14 +4824,25 @@
 
     shouldClick := true.
     "/ when PreselectAllWhenOpeningEditor is true, we should not click into
-    "/ the editor, as this couldclear the selection.
+    "/ the editor, as this could clear the selection.
     "/ however, for non-text editors, it is a good idea to do so...
     PreselectAllWhenOpeningEditor == true ifTrue:[
         shouldClick := false.
 
         editorType := self selectedColumn editorType.
         editorType == #ComboList ifTrue:[ shouldClick := true ].
-        "/ editorType == #ComboBox ifTrue:[ shouldClick := true ].
+        editorType == #ComboBox ifTrue:[ 
+            "/ only click if clicked onto menu-pull button
+            (view ~~ self and:[view notNil]) ifTrue:[
+                |screenPoint comboSubView|
+                
+                screenPoint := device translatePoint:aPoint fromView:self toView:nil.
+                comboSubView := device viewFromPoint:screenPoint.
+                (comboSubView notNil and:[comboSubView isKindOf:Button]) ifTrue:[
+                    shouldClick := true 
+                ].    
+            ].    
+        ].
         editorType == #CheckToggle ifTrue:[ shouldClick := true ].
         editorType == #RadioButton ifTrue:[ shouldClick := true ].
         "/ TODO: more heuristics here...
@@ -4863,6 +4872,7 @@
 
     "Modified: / 07-09-2011 / 16:08:45 / cg"
     "Modified: / 15-03-2017 / 21:09:54 / stefan"
+    "Modified: / 11-09-2018 / 17:44:23 / Claus Gittinger"
 !
 
 selectRowFrom:start to:stop