Xcos: propagate diagram's modified status on superblocks 82/18982/3
Clément DAVID [Fri, 27 Jan 2017 08:41:37 +0000 (09:41 +0100)]
Change-Id: I961f044f171d66779dd22813abac17e161e2b8c4

scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/BlockParametersAction.java

index e0db2aa..c6a2881 100644 (file)
@@ -111,10 +111,13 @@ public class BlockParametersAction extends VertexSelectionDependantAction {
                 // this is a super-block, open it
                 XcosDiagram sub = new XcosDiagram(controller, cell.getUID(), cell.getKind(), cell.getId());
                 XcosCellFactory.insertChildren(controller, sub);
-                sub.setModified(false);
 
                 ScicosObjectOwner root = Xcos.findRoot(graph);
                 Xcos.getInstance().addDiagram(root, sub);
+
+                // propagate the modified status
+                sub.setModified(Xcos.getInstance().isModified(root));
+
                 XcosTab.restore(sub, true);
             } else {
                 BasicBlock block = (BasicBlock) cell;