Moved Am2904/Am2910Testbenches to test source folder
[Mograsim.git] / net.mograsim.logic.model.editor / src / net / mograsim / logic / model / editor / SaveLoadManager.java
index 6d951af..1e3d271 100644 (file)
@@ -54,12 +54,7 @@ public class SaveLoadManager
                try
                {
                        IdentifierGetter idGetter = new IdentifierGetter();
-                       idGetter.componentIDs = c ->
-                       {
-                               if (Editor.identifierPerComponent.containsKey(c))
-                                       return Editor.identifierPerComponent.get(c);
-                               return getStandardID(c, IndirectGUIComponentCreator.getStandardComponentIDs(), true);
-                       };
+                       idGetter.componentIDs = c -> getStandardID(c, IndirectGUIComponentCreator.getStandardComponentIDs(), true);
                        idGetter.symbolRendererIDs = h -> getStandardID(h,
                                        SubmodelComponentSnippetSuppliers.symbolRendererSupplier.getStandardSnippetIDs());
                        idGetter.outlineRendererIDs = h -> getStandardID(h,
@@ -102,7 +97,8 @@ public class SaveLoadManager
                fdShell.dispose();
                if (result != null)
                {
-                       new Editor((DeserializedSubmodelComponent) SubmodelComponentSerializer.deserialize(new ViewModelModifiable(), result));
+                       new Editor((DeserializedSubmodelComponent) IndirectGUIComponentCreator.createComponent(new ViewModelModifiable(),
+                                       "file:" + result));
                }
        }
 }