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