better menu editing
authorClaus Gittinger <cg@exept.de>
Thu, 31 Jul 1997 14:31:07 +0200
changeset 271 ca85216907a4
parent 270 1a68f7479932
child 272 99de6af43afa
better menu editing
UIPainter.st
--- a/UIPainter.st	Thu Jul 31 14:29:58 1997 +0200
+++ b/UIPainter.st	Thu Jul 31 14:31:07 1997 +0200
@@ -1248,25 +1248,36 @@
         ] ifFalse:[
             "/ cg: q&d hack ...
 
-            self warn:'first enter (and confirm) the menus selector.'.
-            ^ self.
-
             aspect := treeView propertySelected.
             aspect notNil ifTrue:[
                 Object errorSignal handle:[:ex |
+                    aspect := nil.
                 ] do:[
                     aspect := aspect view asMenu.
                 ]
-            ]
+            ].
+
+"/            aspect isNil ifTrue:[
+"/                self warn:'first enter (and confirm) the menus selector.'.
+"/                ^ self.
+"/            ].
         ].
         
         editor := MenuEditor new.
         editor masterApplication:self.
         editor activeHelpTool:(self activeHelpTool).
-        editor openModalOnClass:cls andSelector:aspect
+        editor openModalOnClass:cls andSelector:aspect.
+
+        editor selectorName ~= aspect ifTrue:[
+            editor didInstall ifTrue:[
+                specTool specification menu:editor selectorName asSymbol.
+                self modifiedChannel value:true.
+                self accept
+            ]
+        ].
     ]
 
-    "Modified: 28.7.1997 / 18:11:16 / cg"
+    "Modified: 31.7.1997 / 14:26:13 / cg"
 ! !
 
 !UIPainter methodsFor:'active help'!