Fix classes not being marked as dirty when removing methods
@@ -480,6 +480,10 @@ public class FxWindow extends Application {
getSelectionModel().selectedIndexProperty().addListener((c) -> {
setContextMenu(getSelectionModel().getSelectedIndex() == -1 ? null : ctx);
});
+ // mark class as dirty when items list changes.
+ getItems().addListener((ListChangeListener.Change<? extends MethodNode> c) -> {
+ Bus.INSTANCE.post(new ClassDirtyEvent(owner));
+ });
}
}
@@ -594,6 +598,10 @@ public class FxWindow extends Application {
getSelectionModel().selectedIndexProperty().addListener((c) -> {
setContextMenu(getSelectionModel().getSelectedIndex() == -1 ? null : ctx);
});
+ // mark class as dirty when items list changes.
+ getItems().addListener((ListChangeListener.Change<? extends FieldNode> c) -> {
+ Bus.INSTANCE.post(new ClassDirtyEvent(owner));
+ });
}
}
}
