Skip to content

Commit a5fd073

Browse files
committed
Fix minimize and close bugs
coming from btc@05242e937d3fc0144029ccf3b14f98662400dd60 refs bitcoin#8225 To ensure the GUI closes when the "Minimize on close" window option is disabled, and the "Minimize to the tray instead of the taskbar" window option is enbaled, remove a check made against the "Minimize to the tray instead of the taskbar" value, made during GUI closure. To ensure the GUI minimizes to the taskbar when the "Minimize on close" window option is enabled, and the "Minimize to the tray instead of the taskbar" window option is disabled, minimize the GUI and ignore the closure event. Github-Pull: #2377 Rebased-From: d72f7b5
1 parent b516e36 commit a5fd073

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/qt/pivx/pivxgui.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,14 @@ void PIVXGUI::closeEvent(QCloseEvent* event)
352352
if (clientModel && clientModel->getOptionsModel()) {
353353
if (!clientModel->getOptionsModel()->getMinimizeOnClose()) {
354354
QApplication::quit();
355+
} else {
356+
QMainWindow::showMinimized();
357+
event->ignore();
355358
}
356359
}
357-
#endif
360+
#else
358361
QMainWindow::closeEvent(event);
362+
#endif
359363
}
360364

361365

0 commit comments

Comments
 (0)