logic: fixed recent clearing issue (introduced in cad064b9)

* fixed order so that clearing is done before saving the project settings in database
This commit is contained in:
mlangkabel
2018-01-15 19:19:36 +01:00
parent f7a5f98f85
commit 95e04cf485
+4 -5
View File
@@ -335,10 +335,6 @@ void Project::buildIndex(const RefreshInfo& info, DialogView* dialogView)
dialogView->showUnknownProgressDialog("Preparing Indexing", "Setting up Indexers");
m_storageCache->clear();
m_storage->setProjectSettingsText(TextAccess::createFromFile(getProjectSettingsFilePath())->getText());
std::shared_ptr<TaskGroupSequence> taskSequential = std::make_shared<TaskGroupSequence>();
if (info.mode == REFRESH_ALL_FILES)
@@ -347,13 +343,16 @@ void Project::buildIndex(const RefreshInfo& info, DialogView* dialogView)
}
else if (info.filesToClear.size())
{
// add task for clearing the database
taskSequential->addTask(std::make_shared<TaskCleanStorage>(
m_storage.get(),
utility::toVector(info.filesToClear)
));
}
m_storageCache->clear();
m_storage->setProjectSettingsText(TextAccess::createFromFile(getProjectSettingsFilePath())->getText());
std::shared_ptr<IndexerCommandList> indexerCommandList = std::make_shared<IndexerCommandList>();
for (const std::shared_ptr<SourceGroup>& sourceGroup : m_sourceGroups)
{