#DOCUMENTATION by cg
authorClaus Gittinger <cg@exept.de>
Thu, 15 Mar 2018 11:45:48 +0100
changeset 5722 33fa68fa29f9
parent 5721 601f7686ccdb
child 5723 3019347d6f76
#DOCUMENTATION by cg class: SelectionInTreeView changed: #openEditor
SelectionInTreeView.st
--- a/SelectionInTreeView.st	Mon Mar 12 15:40:57 2018 +0100
+++ b/SelectionInTreeView.st	Thu Mar 15 11:45:48 2018 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
               All Rights Reserved
@@ -2000,7 +2002,7 @@
 openEditor
     "open an editor on selection"
 
-    |node x0 x1 y0|
+    |node x0 w x1 y0|
 
     editorWidget notNil ifTrue:[
         ^ self
@@ -2015,10 +2017,10 @@
     ].
     editorWidget withAllSubViewsDo:[:v| v font:gc font ].
 
+    x0 := self xOfValueNode:node.
     y0 := self yOfVisibleLine:y0.
-    x0 := self xOfValueNode:node.
-    x1 := (editorWidget preferredWidth) max:50.
-    x1 := (x0 + x1) min:(self width - 5).
+    w := (editorWidget preferredWidth) max:50.
+    x1 := (x0 + w) min:(self width - 5).
 
     editorWidget geometryLayout:(Rectangle left:x0 right:x1 top:y0 bottom:y0 + fontHeight).