Salome HOME
Issue #2908: Update presentation on call setColor in Python
authorvsv <vsv@opencascade.com>
Thu, 25 Apr 2019 13:40:48 +0000 (16:40 +0300)
committervsv <vsv@opencascade.com>
Mon, 3 Jun 2019 10:32:00 +0000 (13:32 +0300)
src/Model/Model_Data.cpp

index 3df01a82e3ad7fbf288474def777b4c6a103a6e6..01315a892353102cef25427fddd2034533854c51 100644 (file)
@@ -410,8 +410,8 @@ void Model_Data::sendAttributeUpdated(ModelAPI_Attribute* theAttr)
         myWasChangedButBlocked.push_back(theAttr);
     }
   } else {
-    // trim: need to redisplay
-    if (myObject && theAttr->attributeType() == "Point2D") {
+    // trim: need to redisplay or set color in the python script
+    if (myObject && (theAttr->attributeType() == "Point2D" || theAttr->id() == "Color")) {
       static const Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY);
       ModelAPI_EventCreator::get()->sendUpdated(myObject, anEvent);
     }