fix(gui): "Always Select Opened File/Class" was not syncing upon activation (PR #1261)

This commit is contained in:
Jan S 2021-10-22 14:17:27 +02:00 committed by GitHub
parent 0423f33e93
commit 940108661c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -249,8 +249,8 @@ public class JadxSettings extends JadxCLIArgs {
return alwaysSelectOpened;
}
public void setAlwaysSelectOpened(boolean showHeapUsageBar) {
this.alwaysSelectOpened = showHeapUsageBar;
public void setAlwaysSelectOpened(boolean alwaysSelectOpened) {
this.alwaysSelectOpened = alwaysSelectOpened;
partialSync(settings -> settings.alwaysSelectOpened = alwaysSelectOpened);
}

View File

@ -868,6 +868,9 @@ public class MainWindow extends JFrame {
alwaysSelectOpened.setState(settings.isAlwaysSelectOpened());
alwaysSelectOpened.addActionListener(event -> {
settings.setAlwaysSelectOpened(!settings.isAlwaysSelectOpened());
if (settings.isAlwaysSelectOpened()) {
this.syncWithEditor();
}
});
Action syncAction = new AbstractAction(NLS.str("menu.sync"), ICON_SYNC) {