ui: add menu entry to close the current project (issue #722)

This commit is contained in:
mlangkabel
2019-10-18 13:05:27 +02:00
committed by Eberhard Graether
parent dc24bae943
commit 6b692ff0e9
13 changed files with 70 additions and 14 deletions
+14 -1
View File
@@ -146,7 +146,7 @@ Application::~Application()
}
}
const std::shared_ptr<Project> Application::getCurrentProject() const
std::shared_ptr<const Project> Application::getCurrentProject() const
{
return m_project;
}
@@ -213,6 +213,19 @@ void Application::handleMessage(MessageActivateWindow* message)
}
}
void Application::handleMessage(MessageCloseProject* message)
{
if (m_project && m_project->isIndexing())
{
MessageStatus(L"Cannot close the project while indexing.", true, false).dispatch();
return;
}
m_project.reset();
updateTitle();
m_mainView->clear();
}
void Application::handleMessage(MessageIndexingFinished* message)
{
logStorageStats();