From 9e9ee11f607df8a8fdca7c33be6b9340dfb021e7 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 7 Jan 2015 17:15:13 +0000 Subject: [PATCH] Fixed model list dialog not accepting changes. --- qt/lc_qmodellistdialog.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qt/lc_qmodellistdialog.cpp b/qt/lc_qmodellistdialog.cpp index bc1c9c4e..e6fa8693 100644 --- a/qt/lc_qmodellistdialog.cpp +++ b/qt/lc_qmodellistdialog.cpp @@ -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(Item->text(), (lcModel*)Item->data(Qt::UserRole).value())); + } + mActiveModel = ui->ModelList->currentRow(); if (mActiveModel < 0) mActiveModel = 0;