From d83c06100d1fc2d4e171093ce16de361d89f76ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Cuj=C3=A9?= Date: Sun, 10 Mar 2019 15:49:09 +0100 Subject: [PATCH] Do not set active model from model list dialog It's confusing and non-intuitive that saving the changes made to submodels opens the last selected one. Furthermore we have the menu entries to open submodels. --- common/project.cpp | 1 - qt/lc_qmodellistdialog.cpp | 6 +----- qt/lc_qmodellistdialog.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/common/project.cpp b/common/project.cpp index f1dc0c4e..6f9ad272 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -335,7 +335,6 @@ void Project::ShowModelListDialog() mModels = NewModels; - SetActiveModel(Dialog.mActiveModel); gMainWindow->UpdateTitle(); gMainWindow->UpdateModels(); } diff --git a/qt/lc_qmodellistdialog.cpp b/qt/lc_qmodellistdialog.cpp index bc43c49f..873af3a2 100644 --- a/qt/lc_qmodellistdialog.cpp +++ b/qt/lc_qmodellistdialog.cpp @@ -44,10 +44,6 @@ void lcQModelListDialog::accept() mModels.append(QPair(Item->text(), (lcModel*)Item->data(Qt::UserRole).value())); } - mActiveModel = ui->ModelList->currentRow(); - if (mActiveModel < 0) - mActiveModel = 0; - QDialog::accept(); } @@ -182,4 +178,4 @@ void lcQModelListDialog::on_ModelList_currentRowChanged(int CurrentRow) Q_UNUSED(CurrentRow); UpdateButtons(); -} \ No newline at end of file +} diff --git a/qt/lc_qmodellistdialog.h b/qt/lc_qmodellistdialog.h index 7226f24f..fb971e5c 100644 --- a/qt/lc_qmodellistdialog.h +++ b/qt/lc_qmodellistdialog.h @@ -14,7 +14,6 @@ public: lcQModelListDialog(QWidget* Parent, QList>& Models); ~lcQModelListDialog(); - int mActiveModel; QList>& mModels; public slots: