diff --git a/bin/test/data/log/test_log.txt b/bin/test/data/log/test_log.txt index 0799c370..5e4e1ebd 100644 --- a/bin/test/data/log/test_log.txt +++ b/bin/test/data/log/test_log.txt @@ -1,4 +1,3 @@ -Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml Token.cpp ERROR: Location Id was not referenced by this Token. Node.cpp WARNING: Cannot change NodeType after it was already set from namespace to class Edge.cpp ERROR: Nodes are not plain copies. diff --git a/src/lib/Application.cpp b/src/lib/Application.cpp index fb2d4a56..214baff5 100644 --- a/src/lib/Application.cpp +++ b/src/lib/Application.cpp @@ -302,8 +302,8 @@ void Application::handleMessage(MessageLoadProject* message) } catch (...) { - LOG_ERROR_STREAM(<< "Failed to load project. Try restarting Coati as admin"); - MessageStatus("Failed to load project. Try restarting Coati as admin", true).dispatch(); + LOG_ERROR_STREAM(<< "Failed to load project."); + MessageStatus("Failed to load project.", true).dispatch(); } } @@ -311,7 +311,10 @@ void Application::handleMessage(MessageRefresh* message) { TRACE("app refresh"); - loadSettings(); + if (message->reloadSettings) + { + loadSettings(); + } if (message->uiOnly) { @@ -331,7 +334,7 @@ void Application::handleMessage(MessageRefresh* message) void Application::handleMessage(MessageSwitchColorScheme* message) { loadStyle(message->colorSchemePath); - m_componentManager->refreshViews(); + MessageRefresh().refreshUiOnly().keepSettings().dispatch(); } void Application::startMessagingAndScheduling() diff --git a/src/lib/utility/messaging/type/MessageRefresh.h b/src/lib/utility/messaging/type/MessageRefresh.h index 7dc96c9c..5fa5b3b1 100644 --- a/src/lib/utility/messaging/type/MessageRefresh.h +++ b/src/lib/utility/messaging/type/MessageRefresh.h @@ -9,6 +9,7 @@ public: MessageRefresh() : uiOnly(false) , all(false) + , reloadSettings(true) { } @@ -29,6 +30,12 @@ public: return *this; } + MessageRefresh& keepSettings() + { + reloadSettings = false; + return *this; + } + virtual void print(std::ostream& os) const { if (uiOnly) @@ -43,6 +50,7 @@ public: bool uiOnly; bool all; + bool reloadSettings; }; #endif // MESSAGE_REFRESH_H