mirror of
https://github.com/leozide/leocad
synced 2024-12-26 21:58:44 +01:00
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:
parent
764c653252
commit
d83c06100d
3 changed files with 1 additions and 7 deletions
|
@ -335,7 +335,6 @@ void Project::ShowModelListDialog()
|
||||||
|
|
||||||
mModels = NewModels;
|
mModels = NewModels;
|
||||||
|
|
||||||
SetActiveModel(Dialog.mActiveModel);
|
|
||||||
gMainWindow->UpdateTitle();
|
gMainWindow->UpdateTitle();
|
||||||
gMainWindow->UpdateModels();
|
gMainWindow->UpdateModels();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue