Xcos GUI: restore some graphical helpers
[scilab.git] / scilab / modules / xcos / src / java / org / scilab / modules / xcos / XcosTab.java
index 8a6dfb6..c28a411 100644 (file)
@@ -12,6 +12,9 @@
 
 package org.scilab.modules.xcos;
 
+import com.mxgraph.util.mxEvent;
+import com.mxgraph.util.mxEventObject;
+import com.mxgraph.util.mxEventSource;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 import java.lang.ref.WeakReference;
@@ -266,6 +269,10 @@ public class XcosTab extends SwingScilabDockablePanel implements SimpleTab {
         initComponents(graph);
 
         graph.getAsComponent().addKeyListener(new ArrowKeyListener());
+        graph.getModel().addListener(mxEvent.CHANGE, (Object sender, mxEventObject evt) -> {
+            graph.setModified(true);
+            graph.updateTabTitle();
+        });
     }
 
     /*