Deep-Copies the CustomImageObjects from the original Object List in the GuiObjectManager to prevent the dirty check when closing the GUI from failing

This commit is contained in:
CrushedPixel
2015-08-16 14:52:25 +02:00
parent fbf5928a11
commit 5cb4682ad9
2 changed files with 19 additions and 1 deletions

View File

@@ -175,7 +175,11 @@ public class GuiObjectManager extends GuiScreen implements GuiReplayOverlay.NoOv
nameInput.hint = I18n.format("replaymod.gui.objects.properties.name");
for(CustomImageObject customImageObject : initialObjects) {
objectList.addElement(customImageObject);
try {
objectList.addElement(customImageObject.copy());
} catch(IOException ioe) {
ioe.printStackTrace();
}
}
objectList.addSelectionListener(new SelectionListener() {