Skip to content

Commit

Permalink
isTreatAllTabsAsOneBatch returns false in jrd mode and is not shown
Browse files Browse the repository at this point in the history
  • Loading branch information
judovana committed Jul 11, 2023
1 parent d712ecd commit ba4f374
Showing 1 changed file with 20 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -574,18 +574,20 @@ public void actionPerformed(ActionEvent actionEvent) {
}
});
advanced.add(setMethod);
JCheckBox treatAllAsOne = new JCheckBox("Treat all tabs in this window as single batch");
Container parent = getParentWindow();
if (parent != null) {
treatAllAsOne.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
setTreatAllTabsAsOneBatch(treatAllAsOne.isSelected());
repaintMenu(menu);
}
});
treatAllAsOne.setSelected(isTreatAllTabsAsOneBatch());
advanced.add(treatAllAsOne);
if (getParentWindow() != null) {
JCheckBox treatAllAsOne = new JCheckBox("Treat all tabs in this window as single batch");
Container parent = getParentWindow();
if (parent != null) {
treatAllAsOne.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
setTreatAllTabsAsOneBatch(treatAllAsOne.isSelected());
repaintMenu(menu);
}
});
treatAllAsOne.setSelected(isTreatAllTabsAsOneBatch());
advanced.add(treatAllAsOne);
}
}
if (hasVm(classesAndMethodsProvider)) {
JCheckBox addToBoot = new JCheckBox(
Expand Down Expand Up @@ -908,10 +910,16 @@ public boolean isBoot() {
}

private void setTreatAllTabsAsOneBatch(boolean selected) {
if (getParentWindow() == null) {
return;
}
getParentWindow().setTreatAllTabsAsOneBatch(selected);
}

private boolean isTreatAllTabsAsOneBatch() {
if (getParentWindow() == null) {
return false;
}
return getParentWindow().isTreatAllTabsAsOneBatch();
}

Expand Down

0 comments on commit ba4f374

Please sign in to comment.