Xcos diagram loading: update modified status after UID generation 72/7672/2
Clément DAVID [Thu, 21 Jun 2012 14:45:48 +0000 (16:45 +0200)]
Change-Id: If75de6ce21630e52425fd15874b35d2bee99fe21

scilab/modules/xcos/src/java/org/scilab/modules/xcos/graph/XcosDiagram.java

index e3ecdcb..7f940d9 100644 (file)
@@ -1842,13 +1842,13 @@ public class XcosDiagram extends ScilabGraph {
     public void postLoad(final File file) {
         final String name = file.getName();
 
-        setModified(false);
         if (XcosFileType.getAvailableSaveFormats().contains(XcosFileType.findFileType(file))) {
             setSavedFile(file);
             Xcos.getInstance().addDiagram(file, this);
         }
         setTitle(name.substring(0, name.lastIndexOf('.')));
         generateUID();
+        setModified(false);
 
         fireEvent(new mxEventObject(mxEvent.ROOT));