From b76c8822102ac3703514ffaf23ec057167d4be1a Mon Sep 17 00:00:00 2001 From: Skylot Date: Mon, 28 Sep 2020 17:33:08 +0100 Subject: [PATCH] fix(gui): fix rename dialog pack (#972) --- .../src/main/java/jadx/gui/ui/RenameDialog.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/jadx-gui/src/main/java/jadx/gui/ui/RenameDialog.java b/jadx-gui/src/main/java/jadx/gui/ui/RenameDialog.java index 1d46585a036..e1f61b5a505 100644 --- a/jadx-gui/src/main/java/jadx/gui/ui/RenameDialog.java +++ b/jadx-gui/src/main/java/jadx/gui/ui/RenameDialog.java @@ -310,12 +310,19 @@ private void initUI() { contentPane.add(buttonPane, BorderLayout.PAGE_END); setTitle(NLS.str("popup.rename")); + if (!mainWindow.getSettings().loadWindowPos(this)) { + setSize(800, 80); + } + // always pack (ignore saved windows sizes) pack(); - setSize(800, 80); setLocationRelativeTo(null); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); - setModalityType(ModalityType.MODELESS); + setModalityType(ModalityType.APPLICATION_MODAL); + } - mainWindow.getSettings().loadWindowPos(this); + @Override + public void dispose() { + mainWindow.getSettings().saveWindowPos(this); + super.dispose(); } }