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;
SetActiveModel(Dialog.mActiveModel);
gMainWindow->UpdateTitle();
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>()));
}
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();
}
}

View file

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