logic: Fixed cli message handling and Mac build

This commit is contained in:
Eberhard Graether
2017-08-10 01:17:26 +02:00
parent 9269468a7b
commit ece2cbfe14
10 changed files with 48 additions and 78 deletions
+18 -8
View File
@@ -231,10 +231,6 @@ void Application::refreshProject(bool force)
m_componentManager->refreshViews();
}
}
else if (!m_hasGUI)
{
MessageQuitApplication().dispatch();
}
}
}
@@ -263,6 +259,10 @@ void Application::handleMessage(MessageFinishedParsing* message)
{
MessageRefresh().refreshUiOnly().dispatch();
}
else
{
MessageQuitApplication().dispatch();
}
}
void Application::handleMessage(MessageLoadProject* message)
@@ -275,17 +275,27 @@ void Application::handleMessage(MessageLoadProject* message)
return;
}
if (!m_project || projectSettingsFilePath != m_project->getProjectSettingsFilePath())
if (m_project && projectSettingsFilePath == m_project->getProjectSettingsFilePath())
{
createAndLoadProject(projectSettingsFilePath);
if (message->forceRefresh && m_hasGUI)
{
m_project->setStateSettingsUpdated();
refreshProject(false);
}
return;
}
createAndLoadProject(projectSettingsFilePath);
if (message->forceRefresh)
{
m_project->setStateSettingsUpdated();
refreshProject(true);
}
else if (!m_hasGUI)
{
refreshProject(false);
}
}
void Application::handleMessage(MessageRefresh* message)