diff --git a/GUI/View/Layout/ApplicationSettings.cpp b/GUI/View/Layout/ApplicationSettings.cpp index 3fa6f825c74958af354230979ce7bab3ebe8cc03..a9adaf79b42a38a38bfcd3bc3e5aa868c280103c 100644 --- a/GUI/View/Layout/ApplicationSettings.cpp +++ b/GUI/View/Layout/ApplicationSettings.cpp @@ -58,7 +58,7 @@ bool ApplicationSettings::useNativeFileDialog() const #endif } -void ApplicationSettings::saveWindowSizeAndPos(const QWidget* w) +void ApplicationSettings::saveWidgetSettings(const QWidget* w) { ASSERT(!w->objectName().isEmpty()); QSettings settings; @@ -66,7 +66,7 @@ void ApplicationSettings::saveWindowSizeAndPos(const QWidget* w) settings.setValue(S_POS + "/" + w->objectName(), w->pos()); } -void ApplicationSettings::loadWindowSizeAndPos(QWidget* w) +void ApplicationSettings::loadWidgetSettings(QWidget* w) { ASSERT(!w->objectName().isEmpty()); diff --git a/GUI/View/Layout/ApplicationSettings.h b/GUI/View/Layout/ApplicationSettings.h index 3e0b676351f556f39118fa89d37ba06a111d2748..e67a2ac54df6d5fe4faa9ed57b1faab4c4320728 100644 --- a/GUI/View/Layout/ApplicationSettings.h +++ b/GUI/View/Layout/ApplicationSettings.h @@ -27,8 +27,8 @@ public: bool useNativeFileDialog() const; - void saveWindowSizeAndPos(const QWidget* w); - void loadWindowSizeAndPos(QWidget* w); + void saveWidgetSettings(const QWidget* w); + void loadWidgetSettings(QWidget* w); QString xml_dir; }; diff --git a/GUI/View/Loader/PythonScriptWidget.cpp b/GUI/View/Loader/PythonScriptWidget.cpp index e527e0a6405507a56c9dd9deb2bbec3c587d87d6..022589ff15bee39163fcce576378a5d254463c89 100644 --- a/GUI/View/Loader/PythonScriptWidget.cpp +++ b/GUI/View/Loader/PythonScriptWidget.cpp @@ -69,13 +69,13 @@ PythonScriptWidget::PythonScriptWidget(QWidget* parent) setAttribute(Qt::WA_DeleteOnClose, true); GUI::Style::setResizable(this); - gApp->loadWindowSizeAndPos(this); + gApp->loadWidgetSettings(this); } PythonScriptWidget::~PythonScriptWidget() { - gApp->saveWindowSizeAndPos(this); + gApp->saveWidgetSettings(this); } void PythonScriptWidget::generatePythonScript(const SampleItem* sampleItem, diff --git a/GUI/View/Material/MaterialEditorDialog.cpp b/GUI/View/Material/MaterialEditorDialog.cpp index 197cea2b4777914f892d89811a7602905ae3ee9b..4f090eca864e0bd9ba6fe6e108110c8410c1be81 100644 --- a/GUI/View/Material/MaterialEditorDialog.cpp +++ b/GUI/View/Material/MaterialEditorDialog.cpp @@ -235,7 +235,7 @@ MaterialEditorDialog::MaterialEditorDialog(SampleItem* sample, const QString& id layout->insertWidget(0, toolbar); GUI::Style::setResizable(this); - gApp->loadWindowSizeAndPos(this); + gApp->loadWidgetSettings(this); connect(m_tree_view->selectionModel(), &QItemSelectionModel::currentChanged, this, &MaterialEditorDialog::onChangeCurrent); @@ -260,7 +260,7 @@ MaterialEditorDialog::MaterialEditorDialog(SampleItem* sample, const QString& id MaterialEditorDialog::~MaterialEditorDialog() { - gApp->saveWindowSizeAndPos(this); + gApp->saveWidgetSettings(this); } void MaterialEditorDialog::addRefractiveMaterial()