From 55aa1032aa4f53408a8ee79cee9af40e6e021de3 Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 17 Mar 2015 12:05:44 +0300 Subject: [PATCH] Color for results - an error message appears if the result has no defined color in preferences --- src/XGUI/XGUI_CustomPrs.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/XGUI/XGUI_CustomPrs.cpp b/src/XGUI/XGUI_CustomPrs.cpp index 8584bc554..c074a841e 100644 --- a/src/XGUI/XGUI_CustomPrs.cpp +++ b/src/XGUI/XGUI_CustomPrs.cpp @@ -9,6 +9,8 @@ #include #include +#include + #include @@ -37,9 +39,12 @@ void getDefaultColor(ResultPtr theResult, AISObjectPtr thePrs, std::vector& theColor = Config_PropManager::color(aSection, aName, aDefault); } } - if (theColor.empty()) // all AIS objects, where the color is not set, a white. + if (theColor.empty()) { + // all AIS objects, where the color is not set, are in black. // The color should be defined in XML or set in the attribute - theColor = Config_PropManager::color("Visualization", "object_default_color", "#ffffff"); + theColor = Config_PropManager::color("Visualization", "object_default_color", "#000000"); + Events_Error::send("A default color is not defined in the preferences for this kind of result"); + } } bool XGUI_CustomPrs::customisePresentation(ResultPtr theResult, AISObjectPtr thePrs, -- 2.39.2