before loading of a new menu do fire correct sequence of save requests
authortz
Fri, 16 Jan 1998 22:54:52 +0100
changeset 414 116cf2acebe3
parent 413 ac37b2a972ff
child 415 f792d83774b3
before loading of a new menu do fire correct sequence of save requests
MenuEditor.st
--- a/MenuEditor.st	Fri Jan 16 19:06:44 1998 +0100
+++ b/MenuEditor.st	Fri Jan 16 22:54:52 1998 +0100
@@ -612,11 +612,11 @@
           #'window:' 
            #(#WindowSpec
               #'name:' 'Menu Builder'
-              #'layout:' #(#LayoutFrame 284 0 261 0 863 0 644 0)
+              #'layout:' #(#LayoutFrame 171 0 270 0 750 0 653 0)
               #'label:' 'Menu Builder'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1152 900)
-              #'bounds:' #(#Rectangle 284 261 864 645)
+              #'bounds:' #(#Rectangle 171 270 751 654)
               #'menu:' #menu
               #'usePreferredExtent:' false
           )
@@ -626,13 +626,13 @@
                #(
                  #(#MenuPanelSpec
                     #'name:' 'menuToolbarView'
-                    #'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 34 0)
+                    #'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0)
                     #'menu:' #menuToolbar
                     #'showSeparatingLines:' true
                 )
                  #(#VariableHorizontalPanelSpec
                     #'name:' 'variableHorizontalPanel1'
-                    #'layout:' #(#LayoutFrame 0 0.0 36 0.0 0 1.0 -22 1.0)
+                    #'layout:' #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -22 1.0)
                     #'component:' 
                      #(#SpecCollection
                         #'collection:' 
@@ -1605,7 +1605,13 @@
             noText:'No';
             yesText:'Yes';
             showAtPointer;
-            accepted) ifFalse: [self modifiedChannel value: false. ^true].
+            accepted) 
+        ifFalse: 
+        [
+            self modifiedChannel value: false. 
+            isModified := false.
+            ^true
+        ].
         self accept
     ].
     ^true
@@ -1836,7 +1842,7 @@
 
 loadFromMessage: aMessage
 
-    ((aMessage size > 0) and: [self checkModified])
+    (((aMessage size > 0) and: [self checkMenuItemModified]) and: [self checkModified])
     ifTrue:
     [
         |readStream aClass aSelector|
@@ -1924,8 +1930,8 @@
         aspects do:[:anAspect| anAspect value:nil].
         node contents toAspects:aspects
     ].
-    self modifiedChannel value: false
-
+    self modifiedChannel value: false.
+    isModified := false
 !
 
 doBrowseAppClass