Commit 67e3855b authored by Hadi Charara's avatar Hadi Charara
Browse files

Fixed ReadmePanel destructor

It can now save the state of whether is is enabled or not in the
configuration file.
parent b2570980
Pipeline #66877 canceled with stage
...@@ -29,6 +29,12 @@ ReadmePanel::ReadmePanel ( QWidget* parent ) : ...@@ -29,6 +29,12 @@ ReadmePanel::ReadmePanel ( QWidget* parent ) :
this, SLOT(toggleView(bool))); this, SLOT(toggleView(bool)));
} }
ReadmePanel::~ReadmePanel()
{
ReadmePanelSettings::self()->save();
}
void ReadmePanel::toggleView(bool b) void ReadmePanel::toggleView(bool b)
{ {
ReadmePanelSettings::setEnabled(b); ReadmePanelSettings::setEnabled(b);
......
...@@ -19,7 +19,7 @@ class ReadmePanel : public Panel ...@@ -19,7 +19,7 @@ class ReadmePanel : public Panel
public: public:
explicit ReadmePanel(QWidget* parent = nullptr); explicit ReadmePanel(QWidget* parent = nullptr);
~ReadmePanel() override = default; ~ReadmePanel() override;
QSharedPointer<QAction> toggleViewAction; QSharedPointer<QAction> toggleViewAction;
public Q_SLOTS: public Q_SLOTS:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment