Qt: Fix log / log config window not being marked as hidden when closing

This commit is contained in:
spycrab 2017-09-20 13:18:36 +02:00
parent d1abd71ccb
commit 0b43e1bcf4
4 changed files with 18 additions and 0 deletions

View File

@ -196,3 +196,8 @@ void LogConfigWidget::SaveSettings()
LogManager::GetInstance()->SetEnable(type, enabled);
}
}
void LogConfigWidget::closeEvent(QCloseEvent*)
{
Settings::Instance().SetLogConfigVisible(false);
}

View File

@ -7,6 +7,7 @@
#include <QDockWidget>
class QCheckBox;
class QCloseEvent;
class QListWidget;
class QPushButton;
class QRadioButton;
@ -19,6 +20,9 @@ public:
explicit LogConfigWidget(QWidget* parent = nullptr);
~LogConfigWidget();
protected:
void closeEvent(QCloseEvent* event) override;
private:
void CreateWidgets();
void ConnectWidgets();

View File

@ -207,3 +207,8 @@ void LogWidget::Log(LogTypes::LOG_LEVELS level, const char* text)
QString::fromStdString(color),
QString::fromStdString(std::string(text).substr(TIMESTAMP_LENGTH))));
}
void LogWidget::closeEvent(QCloseEvent*)
{
Settings::Instance().SetLogVisible(false);
}

View File

@ -12,6 +12,7 @@
#include "Common/Logging/LogManager.h"
class QCheckBox;
class QCloseEvent;
class QComboBox;
class QPushButton;
class QVBoxLayout;
@ -25,6 +26,9 @@ public:
explicit LogWidget(QWidget* parent = nullptr);
~LogWidget();
protected:
void closeEvent(QCloseEvent*) override;
private:
void UpdateLog();
void UpdateFont();