add undo for creating stuff
[potlatch2.git] / net / systemeD / potlatch2 / RelationSelectPanel.mxml
index 136fa9e..66b78b6 100644 (file)
@@ -44,7 +44,8 @@
         }
         
         public function closeAndNewRelation():void {
-          var relation:Relation = conn.createRelation({}, [new RelationMember(entity, '')])
+          var relation:Relation = conn.createRelation({}, [new RelationMember(entity, '')],
+              MainUndoStack.getGlobalStack().addAction)
           PopUpManager.removePopUp(this);
           trace("edit relation "+id);
           var panel:RelationEditorPanel = RelationEditorPanel(
@@ -62,4 +63,4 @@
       <mx:Spacer width="100%"/>
       <mx:Button label="Select" click="updateEntityAndClose();" enabled="{relationSelector.selectedItem != null? true : false}"/>
     </mx:ControlBar>
-</mx:TitleWindow>
\ No newline at end of file
+</mx:TitleWindow>