diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index 1fa7e7f43..1e3d51b55 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -460,6 +460,16 @@ Widget* Widget::getInstance() return instance; } +void Widget::moveEvent(QMoveEvent *event) +{ + if (event->type() == QEvent::Move) + { + saveWindowGeometry(); + saveSplitterGeometry(); + } + QWidget::moveEvent(event); +} + void Widget::closeEvent(QCloseEvent *event) { if (Settings::getInstance().getShowSystemTray() && Settings::getInstance().getCloseToTray() == true) diff --git a/src/widget/widget.h b/src/widget/widget.h index aca1462cd..b26084c16 100644 --- a/src/widget/widget.h +++ b/src/widget/widget.h @@ -157,6 +157,7 @@ protected: virtual void closeEvent(QCloseEvent *event) final override; virtual void changeEvent(QEvent *event) final override; virtual void resizeEvent(QResizeEvent *event) final override; + virtual void moveEvent(QMoveEvent *event) final override; private slots: void onAddClicked();