*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Wed, 25 Jan 2006 11:39:26 +0100
changeset 1588 7a69b6a027b0
parent 1587 6d56f7fb6a1a
child 1589 f0607bf986e0
*** empty log message ***
UndoSupport.st
--- a/UndoSupport.st	Tue Jan 24 14:40:22 2006 +0100
+++ b/UndoSupport.st	Wed Jan 25 11:39:26 2006 +0100
@@ -134,19 +134,21 @@
 !
 
 executeActionFrom:doList addUndoTo:unDoList
-    |action trans|
+    |action previousTransaction|
 
     doList notEmptyOrNil ifTrue:[
         action := doList removeLast.
 
-        trans := transaction.
-        transaction := OrderedCollection new.
+        previousTransaction := transaction.
+        [
+            transaction := OrderedCollection new.
 
-        action executeIn:actionPerformer.
+            action executeIn:actionPerformer.
 
-        self closeTransactionAndAddTo:unDoList.
-
-        transaction := trans.
+            self closeTransactionAndAddTo:unDoList.
+        ] ensure:[
+            transaction := previousTransaction.
+        ]
     ]
 !
 
@@ -245,5 +247,5 @@
 !UndoSupport class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/UndoSupport.st,v 1.7 2005-04-19 10:01:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/UndoSupport.st,v 1.8 2006-01-25 10:39:26 cg Exp $'
 ! !