[fixes #733] fixes rare bug -- rocket sometimes sends events to deleted ComponentConfigDialog instances
This commit is contained in:
parent
917503149c
commit
1a261a7c75
@ -94,6 +94,11 @@ public class ComponentConfigDialog extends JDialog implements ComponentChangeLis
|
|||||||
this.pack();
|
this.pack();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ComponentConfigDialog getDialog() {
|
||||||
|
return dialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
/**
|
/**
|
||||||
* Return the configurator panel of the current component.
|
* Return the configurator panel of the current component.
|
||||||
*/
|
*/
|
||||||
|
@ -311,6 +311,8 @@ public class RocketActions {
|
|||||||
if (isDeletable(c)) {
|
if (isDeletable(c)) {
|
||||||
ComponentConfigDialog.hideDialog();
|
ComponentConfigDialog.hideDialog();
|
||||||
|
|
||||||
|
c.getRocket().removeComponentChangeListener(ComponentConfigDialog.getDialog());
|
||||||
|
|
||||||
document.addUndoPosition("Delete " + c.getComponentName());
|
document.addUndoPosition("Delete " + c.getComponentName());
|
||||||
delete(c);
|
delete(c);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user