Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New design of icons
[modules/shaper.git]
/
src
/
XGUI
/
XGUI_CustomPrs.cpp
diff --git
a/src/XGUI/XGUI_CustomPrs.cpp
b/src/XGUI/XGUI_CustomPrs.cpp
index 171baa8465bb73e8b61291b7743a9eb0a7558db5..10125e574301d1c8d8cb228a97bb071bd20721f2 100644
(file)
--- a/
src/XGUI/XGUI_CustomPrs.cpp
+++ b/
src/XGUI/XGUI_CustomPrs.cpp
@@
-30,7
+30,7
@@
void getColor(ResultPtr theResult, std::vector<int>& theColor)
}
}
}
}
-void getDefaultColor(ResultPtr theResult,
AISObjectPtr thePrs,
std::vector<int>& theColor)
+void getDefaultColor(ResultPtr theResult, std::vector<int>& theColor)
{
theColor.clear();
// get default color from the preferences manager for the given result
{
theColor.clear();
// get default color from the preferences manager for the given result
@@
-49,14
+49,19
@@
void getDefaultColor(ResultPtr theResult, AISObjectPtr thePrs, std::vector<int>&
}
}
}
}
+void XGUI_CustomPrs::getResultColor(ResultPtr theResult, std::vector<int>& theColor)
+{
+ getColor(theResult, theColor);
+ if (theColor.empty())
+ getDefaultColor(theResult, theColor);
+}
+
bool XGUI_CustomPrs::customisePresentation(ResultPtr theResult, AISObjectPtr thePrs,
std::shared_ptr<GeomAPI_ICustomPrs> theCustomPrs)
{
std::vector<int> aColor;
bool XGUI_CustomPrs::customisePresentation(ResultPtr theResult, AISObjectPtr thePrs,
std::shared_ptr<GeomAPI_ICustomPrs> theCustomPrs)
{
std::vector<int> aColor;
- getColor(theResult, aColor);
- if (aColor.empty())
- getDefaultColor(theResult, thePrs, aColor);
+ getResultColor(theResult, aColor);
SessionPtr aMgr = ModelAPI_Session::get();
if (aMgr->activeDocument() != theResult->document()) {
SessionPtr aMgr = ModelAPI_Session::get();
if (aMgr->activeDocument() != theResult->document()) {