Don't clear config listeners on document undo
This commit is contained in:
parent
7ea17b01d2
commit
b2d19181b1
@ -46,7 +46,7 @@ public class ComponentConfigDialog extends JDialog implements ComponentChangeLis
|
||||
private RocketComponentConfig configurator = null;
|
||||
private boolean isModified = false;
|
||||
private final boolean isNewComponent;
|
||||
protected static boolean clearConfigListeners = true;
|
||||
public static boolean clearConfigListeners = true;
|
||||
private static String previousSelectedTab = null; // Name of the previous selected tab
|
||||
|
||||
|
||||
|
@ -277,6 +277,7 @@ public class RocketComponentConfig extends JPanel {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent arg0) {
|
||||
if (preferences.getBoolean(IGNORE_DISCARD_EDITING_WARNING, false)) {
|
||||
ComponentConfigDialog.clearConfigListeners = false; // Undo action => config listeners of new component will be cleared
|
||||
ComponentConfigDialog.disposeDialog();
|
||||
document.undo();
|
||||
return;
|
||||
@ -291,6 +292,7 @@ public class RocketComponentConfig extends JPanel {
|
||||
int resultYesNo = JOptionPane.showConfirmDialog(RocketComponentConfig.this, msg,
|
||||
trans.get("RocketCompCfg.CancelOperation.title"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
|
||||
if (resultYesNo == JOptionPane.YES_OPTION) {
|
||||
ComponentConfigDialog.clearConfigListeners = false; // Undo action => config listeners of new component will be cleared
|
||||
ComponentConfigDialog.disposeDialog();
|
||||
document.undo();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user