Move components to an actual resource folder (that will remain in jar)
[Mograsim.git] / net.mograsim.logic.model.editor / src / net / mograsim / logic / model / editor / Editor.java
index e327915..2cc13c1 100644 (file)
@@ -24,6 +24,7 @@ import net.mograsim.logic.model.model.ViewModelModifiable;
 import net.mograsim.logic.model.model.components.GUIComponent;
 import net.mograsim.logic.model.model.wires.GUIWire;
 import net.mograsim.logic.model.serializing.DeserializedSubmodelComponent;
+import net.mograsim.logic.model.serializing.IdentifierGetter;
 import net.mograsim.logic.model.serializing.IndirectGUIComponentCreator;
 
 public final class Editor
@@ -175,7 +176,9 @@ public final class Editor
 
        public static String getIdentifier(GUIComponent c)
        {
-               return identifierPerComponent.get(c);
+               if (identifierPerComponent.containsKey(c))
+                       return identifierPerComponent.get(c);
+               return new IdentifierGetter().componentIDs.apply(c);
        }
 
        public void duplicate()