logic: multiple fixes and improvements

* showing project name in main window title
* keep reference count visible when maximizing code file
* show first node in db when no main function is available
* log Storage stats after parse
* fixed macro locations saved multiply
* using NameHierarchy when retrieving ids
This commit is contained in:
Eberhard Graether
2015-10-01 19:03:05 +02:00
parent 8fa9bdde5e
commit 2704d47cd8
28 changed files with 246 additions and 154 deletions
+11 -7
View File
@@ -24,6 +24,8 @@ std::shared_ptr<Application> Application::create(ViewFactory* viewFactory)
ptr->m_componentManager = ComponentManager::create(viewFactory, ptr->m_storageCache.get());
ptr->m_mainView = viewFactory->createMainView();
ptr->m_mainView->setTitle("Coati");
ptr->m_componentManager->setup(ptr->m_mainView.get());
ptr->m_mainView->loadLayout();
@@ -71,6 +73,8 @@ void Application::loadProject(const FilePath& projectSettingsFilePath)
updateRecentProjects(projectSettingsFilePath);
m_mainView->setTitle(projectSettingsFilePath.fileName());
m_storageCache->clear();
m_componentManager->refreshViews();
@@ -109,20 +113,20 @@ void Application::handleMessage(MessageFinishedParsing* message)
m_isInitialParse = false;
Id mainId = m_storageCache->getIdForNodeWithNameHierarchy(NameHierarchy("main"));
Id nodeId = m_storageCache->getIdForNodeWithNameHierarchy(NameHierarchy("main"));
if (!mainId)
if (!nodeId)
{
mainId = 1;
nodeId = m_storageCache->getIdForFirstNode();
}
if (mainId)
if (nodeId)
{
MessageActivateNodes message;
message.addNode(
mainId,
m_storageCache->getNodeTypeForNodeWithId(mainId),
m_storageCache->getNameHierarchyForNodeWithId(mainId)
nodeId,
m_storageCache->getNodeTypeForNodeWithId(nodeId),
m_storageCache->getNameHierarchyForNodeWithId(nodeId)
);
message.isFromSystem = true;
message.dispatch();