diff --git a/src/main/java/nl/andrewlalis/erme/model/MappingModel.java b/src/main/java/nl/andrewlalis/erme/model/MappingModel.java index 9fc16da..b7763d0 100644 --- a/src/main/java/nl/andrewlalis/erme/model/MappingModel.java +++ b/src/main/java/nl/andrewlalis/erme/model/MappingModel.java @@ -28,7 +28,6 @@ public class MappingModel implements Serializable, Viewable { public MappingModel() { this.relations = new HashSet<>(); this.changeListeners = new HashSet<>(); - this.addChangeListener(OrderableListPanel.getInstance()); } public void addRelation(Relation r) { diff --git a/src/main/java/nl/andrewlalis/erme/view/DiagramPanel.java b/src/main/java/nl/andrewlalis/erme/view/DiagramPanel.java index d2ebd37..49406d6 100644 --- a/src/main/java/nl/andrewlalis/erme/view/DiagramPanel.java +++ b/src/main/java/nl/andrewlalis/erme/view/DiagramPanel.java @@ -64,6 +64,7 @@ public class DiagramPanel extends JPanel implements ModelChangeListener { this.addMouseListener(listener); this.addMouseMotionListener(listener); this.updateActionModels(); + newModel.addChangeListener(OrderableListPanel.getInstance()); this.centerModel(); this.repaint(); }