Fix duplicate preference window upon prefs import
This commit is contained in:
parent
e46c0bec2b
commit
8ca59685ed
@ -364,7 +364,16 @@ public class GeneralPreferencesPanel extends PreferencesPanel {
|
||||
trans.get("generalprefs.ImportWarning.msg"),
|
||||
trans.get("generalprefs.ImportWarning.title"),
|
||||
JOptionPane.WARNING_MESSAGE);
|
||||
PreferencesDialog.showPreferences(parent.getParentFrame()); // Refresh the preferences dialog
|
||||
|
||||
// Introduce a small delay before showing the PreferencesDialog
|
||||
Timer timer = new Timer(100, new ActionListener() { // 100ms delay
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent arg0) {
|
||||
PreferencesDialog.showPreferences(parent.getParentFrame()); // Refresh the preferences dialog
|
||||
}
|
||||
});
|
||||
timer.setRepeats(false); // Only execute once
|
||||
timer.start(); // Start the timer
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user