ui: add menu entry to close the current project (issue #722)
This commit is contained in:
committed by
Eberhard Graether
parent
dc24bae943
commit
6b692ff0e9
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user