if (!isDisabled()) // disabled feature may be executed when it is added as not enabled (#2078)
theResult->setDisabled(theResult, false);
- Config_Prop* aProp = Config_PropManager::findProp("Visualization", "result_group_auto_color");
-
- if (aProp) {
- bool anIsAutoColor = Config_PropManager::boolean("Visualization", "result_group_auto_color");
-
- if (anIsAutoColor && theResult->groupName() == ModelAPI_ResultGroup::group()) {
+ if (Config_PropManager::getAutoColorStatus()
+ && theResult->groupName() == ModelAPI_ResultGroup::group()) {
std::vector<int> aColor;
ModelAPI_Tools::findRandomColor(aColor);
ModelAPI_Tools::setColor(theResult, aColor);
}
- }
}
void ModelAPI_Feature::setResult(const std::shared_ptr<ModelAPI_Result>& theResult,