UIPainterView.st
changeset 1954 1344ec1f99eb
parent 1953 3b5022bccca4
child 1959 fd6bf76e712a
--- a/UIPainterView.st	Tue Jan 10 14:32:38 2006 +0100
+++ b/UIPainterView.st	Tue Jan 10 22:01:26 2006 +0100
@@ -465,7 +465,8 @@
 
     self withinTransaction:#paste objects:newSel do:[
         undoHistory addUndoSelector:#undoCreate:
-                           withArgs:(newSel collect:[:v|(self propertyOfView:v) identifier])
+                           withArgs:(newSel collect:[:v|(self propertyOfView:v) identifier]).
+        self undoHistoryChanged.
     ].
 
     self realizeAllSubViews.
@@ -2198,7 +2199,7 @@
     ]
 !
 
-withinTransaction:aType objects:objects do:aNoneArgBlock
+withinTransaction:aType objects:objects do:aNoArgBlock
     "evaluate a block with no arguments within a transaction
     "
     |text size prop|
@@ -2208,21 +2209,20 @@
     size := objects size.
 
     objects isCollection ifTrue:[
-	size == 0 ifTrue:[ ^ self ].
-	size == 1 ifTrue:[ prop := self propertyOfView:(objects first) ]
+        size == 0 ifTrue:[ ^ self ].
+        size == 1 ifTrue:[ prop := self propertyOfView:(objects first) ]
     ] ifFalse:[
-	prop := self propertyOfView:objects
+        prop := self propertyOfView:objects
     ].
 
     prop notNil ifTrue:[
-	text := prop name
+        text := prop name
     ] ifFalse:[
-	text := size printString, ' elements'
+        text := size printString, ' elements'
     ].
 
-    undoHistory withinTransaction:aType text:text do:[
-	aNoneArgBlock value
-    ]
+    undoHistory withinTransaction:aType text:text do:aNoArgBlock.
+    self undoHistoryChanged.
 ! !
 
 !UIPainterView methodsFor:'undo actions'!
@@ -2233,21 +2233,22 @@
     |lyt args prop|
 
     undoHistory isTransactionOpen ifTrue:[
-	prop := self propertyOfView:aView.
-
-	prop notNil ifTrue:[
-	    args := Array new:3.
-	    args at:1 put:(prop identifier).
-
-	    (lyt := aView geometryLayout) notNil ifTrue:[
-		args at:2 put:#geometryLayout:
-	    ] ifFalse:[
-		lyt := aView extent.
-		args at:2 put:#extent:
-	    ].
-	    args at:3 put:(lyt copy).
-	    undoHistory addUndoSelector:#undoLayout: withArgs:args.
-	]
+        prop := self propertyOfView:aView.
+
+        prop notNil ifTrue:[
+            args := Array new:3.
+            args at:1 put:(prop identifier).
+
+            (lyt := aView geometryLayout) notNil ifTrue:[
+                args at:2 put:#geometryLayout:
+            ] ifFalse:[
+                lyt := aView extent.
+                args at:2 put:#extent:
+            ].
+            args at:3 put:(lyt copy).
+            undoHistory addUndoSelector:#undoLayout: withArgs:args.
+            self undoHistoryChanged.
+        ]
     ]
 !
 
@@ -2257,14 +2258,15 @@
     |prop pid|
 
     (prop := self propertyOfView:aView) notNil ifTrue:[
-	(pid := self propertyOfParentForView:aView) notNil ifTrue:[
-	    pid := pid identifier
-	].
-
-	undoHistory addUndoSelector:#undoRemove:
-			   withArgs:(Array with:(self fullSpecFor:aView)
-			       with:(prop identifier)
-			       with:pid)
+        (pid := self propertyOfParentForView:aView) notNil ifTrue:[
+            pid := pid identifier
+        ].
+
+        undoHistory addUndoSelector:#undoRemove:
+                           withArgs:(Array with:(self fullSpecFor:aView)
+                               with:(prop identifier)
+                               with:pid).
+        self undoHistoryChanged.
     ]
 !
 
@@ -2272,8 +2274,9 @@
     "undo method when changing the specification for an object
     "
     aProp notNil ifTrue:[
-	undoHistory addUndoSelector:#undoSpecModify:
-			   withArgs:(Array with:(aProp spec) with:(aProp identifier))
+        undoHistory addUndoSelector:#undoSpecModify:
+                           withArgs:(Array with:(aProp spec) with:(aProp identifier)).
+        self undoHistoryChanged.
     ]
 !