From 43363f25e628ba72076af86c8d8446343622f1e8 Mon Sep 17 00:00:00 2001 From: vane11ope Date: Fri, 25 Jan 2019 03:04:39 +0900 Subject: [PATCH] Fix a resizing issue --- src/widgets/OverviewWidget.cpp | 6 ++++++ src/widgets/OverviewWidget.h | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/src/widgets/OverviewWidget.cpp b/src/widgets/OverviewWidget.cpp index 69c51fae..f3ab272c 100644 --- a/src/widgets/OverviewWidget.cpp +++ b/src/widgets/OverviewWidget.cpp @@ -24,6 +24,12 @@ OverviewWidget::OverviewWidget(MainWindow *main, QAction *action) : OverviewWidget::~OverviewWidget() {} +void OverviewWidget::resizeEvent(QResizeEvent *event) +{ + graphView->refreshView(); + QDockWidget::resizeEvent(event); +} + void OverviewWidget::updateContents() { if (!refreshDeferrer->attemptRefresh(nullptr)) { diff --git a/src/widgets/OverviewWidget.h b/src/widgets/OverviewWidget.h index c58c2b01..327bd7e8 100644 --- a/src/widgets/OverviewWidget.h +++ b/src/widgets/OverviewWidget.h @@ -17,6 +17,10 @@ public: private: RefreshDeferrer *refreshDeferrer; + /** + * @brief this takes care of scaling the overview when the widget is resized + */ + void resizeEvent(QResizeEvent *event) override; private slots: /**