Skip to content
Permalink
Browse files

logic: Unblock UI when aborting indexing after partial refresh warning

  • Loading branch information
egraether committed Apr 23, 2019
1 parent 9e9d488 commit ee1fd9c38bd46c3759f2817ecbae7e2da50b8ad1
Showing with 5 additions and 4 deletions.
  1. +5 −4 src/lib/project/Project.cpp
@@ -436,14 +436,15 @@ void Project::buildIndex(RefreshInfo info, std::shared_ptr<DialogView> dialogVie

if (abortIndexing)
{
if (dialogView->confirm(
if (m_hasGUI && dialogView->confirm(
"<p>This project contains a source group of type \"" + sourceGroupTypeToString(sourceGroup->getType()) + "\" "
"that cannot be partially cleared. Do you want to re-index the whole project instead?</p>",
{ "Full Re-Index", "Cancel" }
) == 1)
{
MessageStatus(L"Cannot partially clear project. Indexing aborted.").dispatch();
m_refreshStage = RefreshStageType::NONE;
dialogView->clearDialogs();
return;
}
else
@@ -499,7 +500,7 @@ void Project::buildIndex(RefreshInfo info, std::shared_ptr<DialogView> dialogVie
{
if (sourceGroup->getStatus() == SOURCE_GROUP_STATUS_ENABLED)
{
if (sourceGroup->getType() == SOURCE_GROUP_CUSTOM_COMMAND ||
if (sourceGroup->getType() == SOURCE_GROUP_CUSTOM_COMMAND ||
sourceGroup->getType() == SOURCE_GROUP_PYTHON_EMPTY)
{
customIndexerCommandProvider->addProvider(sourceGroup->getIndexerCommandProvider(info.filesToIndex));
@@ -620,8 +621,8 @@ void Project::buildIndex(RefreshInfo info, std::shared_ptr<DialogView> dialogVie

taskSequential->addTask(
std::make_shared<TaskExecuteCustomCommands>(
std::move(customIndexerCommandProvider),
tempStorage,
std::move(customIndexerCommandProvider),
tempStorage,
dialogView,
adjustedIndexerThreadCount,
getProjectSettingsFilePath().getParentDirectory())

0 comments on commit ee1fd9c

Please sign in to comment.
You can’t perform that action at this time.