mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-10-12 02:08:45 +00:00
Qt: Fix closing log window via taskbar
This commit is contained in:
committed by
Connor McLaughlin
parent
23d98e9352
commit
3f4d9fd23c
@@ -76,6 +76,7 @@ void LogWindow::updateSettings()
|
||||
}
|
||||
else if (g_log_window)
|
||||
{
|
||||
g_log_window->m_destroying = true;
|
||||
g_log_window->close();
|
||||
g_log_window->deleteLater();
|
||||
g_log_window = nullptr;
|
||||
@@ -88,6 +89,7 @@ void LogWindow::destroy()
|
||||
if (!g_log_window)
|
||||
return;
|
||||
|
||||
g_log_window->m_destroying = true;
|
||||
g_log_window->close();
|
||||
g_log_window->deleteLater();
|
||||
g_log_window = nullptr;
|
||||
@@ -248,6 +250,11 @@ void LogWindow::logCallback(LOGLEVEL level, ConsoleColors color, std::string_vie
|
||||
|
||||
void LogWindow::closeEvent(QCloseEvent* event)
|
||||
{
|
||||
if (!m_destroying)
|
||||
{
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
Log::SetHostOutputLevel(LOGLEVEL_NONE, nullptr);
|
||||
|
||||
saveSize();
|
||||
|
||||
@@ -48,6 +48,7 @@ private:
|
||||
QMenu* m_level_menu;
|
||||
|
||||
bool m_attached_to_main_window = true;
|
||||
bool m_destroying = false;
|
||||
};
|
||||
|
||||
extern LogWindow* g_log_window;
|
||||
|
||||
Reference in New Issue
Block a user