Fix property name generation showing no results
When the task takes <500ms, results are never displayed.
This commit is contained in:
parent
d7d5fe67b2
commit
d8a7da9234
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue