From a12eb73bece76440747c127b6ca92f609bb7410a Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 10 Feb 2015 19:50:47 +0200 Subject: [PATCH] Dynamic update tool property browser after applying options changes. --HG-- branch : feature --- src/app/dialogs/app/configdialog.cpp | 1 + src/app/dialogs/app/configdialog.h | 2 ++ src/app/mainwindow.cpp | 1 + 3 files changed, 4 insertions(+) diff --git a/src/app/dialogs/app/configdialog.cpp b/src/app/dialogs/app/configdialog.cpp index 52bc5d5f0..c210cdf12 100644 --- a/src/app/dialogs/app/configdialog.cpp +++ b/src/app/dialogs/app/configdialog.cpp @@ -156,6 +156,7 @@ void ConfigDialog::Apply() default: break; } + emit UpdateProperties(); setResult(QDialog::Accepted); } diff --git a/src/app/dialogs/app/configdialog.h b/src/app/dialogs/app/configdialog.h index 8045a33d2..1c93a6ab6 100644 --- a/src/app/dialogs/app/configdialog.h +++ b/src/app/dialogs/app/configdialog.h @@ -43,6 +43,8 @@ public: explicit ConfigDialog(QWidget *parent = nullptr); public slots: void changePage(QListWidgetItem *current, QListWidgetItem *previous); +signals: + void UpdateProperties(); protected: virtual void closeEvent(QCloseEvent *event); private: diff --git a/src/app/mainwindow.cpp b/src/app/mainwindow.cpp index de93e055c..56b43ca2b 100644 --- a/src/app/mainwindow.cpp +++ b/src/app/mainwindow.cpp @@ -1402,6 +1402,7 @@ void MainWindow::Open() void MainWindow::Preferences() { ConfigDialog dlg(this); + connect(&dlg, &ConfigDialog::UpdateProperties, toolOptions, &VToolOptionsPropertyBrowser::UpdateOptions); if (dlg.exec() == QDialog::Accepted) { InitAutoSave();