Fixed model list dialog not accepting changes.

This commit is contained in:
leo 2015-01-07 17:15:13 +00:00
parent 06496f1cf0
commit 9e9ee11f60

View file

@ -23,6 +23,14 @@ lcQModelListDialog::~lcQModelListDialog()
void lcQModelListDialog::accept()
{
mModels.clear();
for (int ItemIdx = 0; ItemIdx < ui->ModelList->count(); ItemIdx++)
{
QListWidgetItem* Item = ui->ModelList->item(ItemIdx);
mModels.append(QPair<QString, lcModel*>(Item->text(), (lcModel*)Item->data(Qt::UserRole).value<uintptr_t>()));
}
mActiveModel = ui->ModelList->currentRow();
if (mActiveModel < 0)
mActiveModel = 0;