Fix duplicate preference window upon prefs import
This commit is contained in:
parent
e46c0bec2b
commit
8ca59685ed
@ -364,9 +364,18 @@ public class GeneralPreferencesPanel extends PreferencesPanel {
|
|||||||
trans.get("generalprefs.ImportWarning.msg"),
|
trans.get("generalprefs.ImportWarning.msg"),
|
||||||
trans.get("generalprefs.ImportWarning.title"),
|
trans.get("generalprefs.ImportWarning.title"),
|
||||||
JOptionPane.WARNING_MESSAGE);
|
JOptionPane.WARNING_MESSAGE);
|
||||||
|
|
||||||
|
// 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
|
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