Skip to content

Commit

Permalink
Merge pull request #152 from stanleytangzh/bugfix/minimized-help-window
Browse files Browse the repository at this point in the history
Bugfix/minimized help window
  • Loading branch information
Darren-Tung authored Nov 5, 2024
2 parents 5ff5dd6 + 348b134 commit 447ae6c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/seedu/address/ui/MainWindowNew.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,16 @@ private void setWindowDefaultSize(GuiSettings guiSettings) {
*/
@FXML
public void handleHelp() {
// If the Help Window is not showing, show it
if (!helpWindow.isShowing()) {
helpWindow.show();
} else {
helpWindow.focus();
// If the Help Window is minimized, restore it
Stage helpStage = helpWindow.getRoot();
if (helpStage.isIconified()) {
helpStage.setIconified(false); // Restore the minimized Help Window
}
helpWindow.focus(); // Focus on the Help Window
}
}

Expand Down

0 comments on commit 447ae6c

Please sign in to comment.