Skip to content

Commit 6bfe94f

Browse files
committed
attempt to fix toggle button on mac
1 parent 99c190f commit 6bfe94f

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/main/java/com/thedeanda/ajaxproxy/ui/MainPanel.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -383,14 +383,18 @@ private void showCard(String cardName) {
383383
}
384384

385385
private void selectedCard(String cardName, JToggleButton selectedToolbarButton) {
386-
serverToolbarButton.setSelected(false);
387-
requestToolbarButton.setSelected(false);
388-
loggerToolbarButton.setSelected(false);
389-
variablesToolbarButton.setSelected(false);
386+
if (selectedToolbarButton != serverToolbarButton)
387+
serverToolbarButton.setSelected(false);
388+
if (selectedToolbarButton != requestToolbarButton)
389+
requestToolbarButton.setSelected(false);
390+
if (selectedToolbarButton != loggerToolbarButton)
391+
loggerToolbarButton.setSelected(false);
392+
if (selectedToolbarButton != variablesToolbarButton)
393+
variablesToolbarButton.setSelected(false);
390394

391395
cardLayout.show(cardPanel, cardName);
392396

393-
selectedToolbarButton.setSelected(true);
397+
// selectedToolbarButton.setSelected(true);
394398

395399
}
396400
}

0 commit comments

Comments
 (0)