Fix property name generation showing no results

When the task takes <500ms, results are never displayed.
This commit is contained in:
Luke Street 2021-08-04 15:59:15 -04:00
parent d7d5fe67b2
commit d8a7da9234
2 changed files with 1 additions and 7 deletions

View File

@ -136,7 +136,6 @@ void CGeneratePropertyNamesDialog::StartGeneration()
ASSERT(!mRunningNameGeneration);
mRunningNameGeneration = true;
mCanceledNameGeneration = false;
mTaskOutput.clear();
mCheckedItems.clear();
mpUI->OutputTreeWidget->clear();
@ -188,13 +187,11 @@ void CGeneratePropertyNamesDialog::GenerationComplete()
mNotifier.SetCanceled(false);
mUpdateTimer.stop();
mTaskOutput = QList<SGeneratedPropertyName>::fromStdList(mGenerator.GetOutput());
mpUI->ProgressBar->setValue(mpUI->ProgressBar->maximum());
disconnect(&mFutureWatcher, nullptr, this, nullptr);
disconnect(&mUpdateTimer, nullptr, this, nullptr);
UpdateUI();
CheckForNewResults();
}
/** Called when an item in the output tree has been checked or unchecked */

View File

@ -45,9 +45,6 @@ class CGeneratePropertyNamesDialog : public QDialog
/** Timer for fetching updates from name generation task */
QTimer mUpdateTimer;
/** Copy of the output buffer from the name generator; only set after completion */
QList<SGeneratedPropertyName> mTaskOutput;
/** Checked items in the output tree widget */
QVector<QTreeWidgetItem*> mCheckedItems;