data: fixes and improvements

* save forward declarations of classes and structs as NODE_UNDEFINED_TYPE
* put whole files on top in snippet sorting
* uses aggregation count as weight in graph layouting instead of adding all edges to graph
* refreshing all views of components on MessageRefresh in ComponentManager
* reloading ApplikatinoSettings on MessageRefresh
This commit is contained in:
Eberhard Graether
2015-05-25 04:12:52 +02:00
parent f15f0de414
commit 149bb52c4c
13 changed files with 53 additions and 51 deletions
+8 -3
View File
@@ -13,8 +13,7 @@
std::shared_ptr<Application> Application::create(ViewFactory* viewFactory)
{
std::shared_ptr<ApplicationSettings> settings = ApplicationSettings::getInstance();
settings->load("data/ApplicationSettings.xml");
loadSettings();
std::shared_ptr<Application> ptr(new Application());
@@ -26,7 +25,7 @@ std::shared_ptr<Application> Application::create(ViewFactory* viewFactory)
ptr->m_componentManager->setup(ptr->m_mainView.get());
ptr->m_mainView->loadLayout();
std::string startupProjectFilePath = settings->getStartupProjectFilePath();
std::string startupProjectFilePath = ApplicationSettings::getInstance()->getStartupProjectFilePath();
if (startupProjectFilePath.size())
{
MessageLoadProject(startupProjectFilePath).dispatch();
@@ -40,6 +39,11 @@ std::shared_ptr<Application> Application::create(ViewFactory* viewFactory)
return ptr;
}
void Application::loadSettings()
{
ApplicationSettings::getInstance()->load("data/ApplicationSettings.xml");
}
Application::Application()
{
TaskScheduler::getInstance()->startSchedulerLoopThreaded();
@@ -124,6 +128,7 @@ void Application::handleMessage(MessageLoadSource* message)
void Application::handleMessage(MessageRefresh* message)
{
loadSettings();
reloadProject();
}