From: nds Date: Tue, 17 Mar 2015 09:05:44 +0000 (+0300) Subject: Color for results - an error message appears if the result has no defined color in... X-Git-Tag: V_1.1.0~126 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=55aa1032aa4f53408a8ee79cee9af40e6e021de3;p=modules%2Fshaper.git Color for results - an error message appears if the result has no defined color in preferences --- 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,