Salome HOME
bos #29478 Merge branch 'CR29478'
[modules/shaper.git] / src / XGUI / XGUI_WorkshopListener.cpp
index 7514897c211a56a706dc2a057a5344e89f21ea1d..dfce8b8a474ffc5fba3eb56db54d21f2f193e6ec 100644 (file)
@@ -121,6 +121,7 @@ void XGUI_WorkshopListener::initializeEventListening()
   aLoop->registerListener(this, Events_Loop::eventByName("AbortOperation"));
   aLoop->registerListener(this, Events_Loop::eventByName(EVENT_AUTOMATIC_RECOMPUTATION_ENABLE));
   aLoop->registerListener(this, Events_Loop::eventByName(EVENT_AUTOMATIC_RECOMPUTATION_DISABLE));
+  aLoop->registerListener(this, ModelAPI_ObjectRenamedMessage::eventId());
 }
 
 //******************************************************
@@ -220,11 +221,16 @@ void XGUI_WorkshopListener::processEvent(const std::shared_ptr<Events_Message>&
     // the viewer's update context is unblocked, the viewer's update works
     XGUI_Displayer* aDisplayer = workshop()->displayer();
     aDisplayer->enableUpdateViewer(true);
-  } else if ((theMessage->eventID() ==
+  }
+  else if ((theMessage->eventID() ==
     Events_Loop::eventByName(EVENT_AUTOMATIC_RECOMPUTATION_ENABLE)) ||
     (theMessage->eventID() ==
       Events_Loop::eventByName(EVENT_AUTOMATIC_RECOMPUTATION_DISABLE))) {
     myWorkshop->updateAutoComputeState();
+  }
+  else if (theMessage->eventID() == ModelAPI_ObjectRenamedMessage::eventId()) {
+    myWorkshop->updateGroupsText();
+    myWorkshop->displayer()->updateViewer();
   } else {
     //Show error dialog if error message received.
     std::shared_ptr<Events_InfoMessage> anIngfoMsg =