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.
This commit is contained in:
Thomas Cujé 2019-03-10 15:49:09 +01:00 committed by Leonardo Zide
parent 764c653252
commit d83c06100d
3 changed files with 1 additions and 7 deletions

View file

@ -335,7 +335,6 @@ void Project::ShowModelListDialog()
mModels = NewModels; mModels = NewModels;
SetActiveModel(Dialog.mActiveModel);
gMainWindow->UpdateTitle(); gMainWindow->UpdateTitle();
gMainWindow->UpdateModels(); gMainWindow->UpdateModels();
} }

View file

@ -44,10 +44,6 @@ void lcQModelListDialog::accept()
mModels.append(QPair<QString, lcModel*>(Item->text(), (lcModel*)Item->data(Qt::UserRole).value<uintptr_t>())); mModels.append(QPair<QString, lcModel*>(Item->text(), (lcModel*)Item->data(Qt::UserRole).value<uintptr_t>()));
} }
mActiveModel = ui->ModelList->currentRow();
if (mActiveModel < 0)
mActiveModel = 0;
QDialog::accept(); QDialog::accept();
} }
@ -182,4 +178,4 @@ void lcQModelListDialog::on_ModelList_currentRowChanged(int CurrentRow)
Q_UNUSED(CurrentRow); Q_UNUSED(CurrentRow);
UpdateButtons(); UpdateButtons();
} }

View file

@ -14,7 +14,6 @@ public:
lcQModelListDialog(QWidget* Parent, QList<QPair<QString, lcModel*>>& Models); lcQModelListDialog(QWidget* Parent, QList<QPair<QString, lcModel*>>& Models);
~lcQModelListDialog(); ~lcQModelListDialog();
int mActiveModel;
QList<QPair<QString, lcModel*>>& mModels; QList<QPair<QString, lcModel*>>& mModels;
public slots: public slots: