]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMESHGUI/SMESHGUI.cxx
Salome HOME
Issue 0019818: EDF 703 SMESH VISU : Display Mesh Groups names in viewer (as a caption)
[modules/smesh.git] / src / SMESHGUI / SMESHGUI.cxx
index 64398d22536eb8eb14db78a4693417bd91aa6269..1e32987caaaaf34a4044103df4fd8686ba92b53d 100644 (file)
@@ -2120,6 +2120,15 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
               {
                 SMESHGUI::GetSMESHGen()->SetName(obj->GetIOR().c_str(), newName.toLatin1().data());
 
+               // update name of group object and its actor
+               SMESH::SMESH_GroupBase_var aGroupObject = SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(IObject);
+               if( !aGroupObject->_is_nil() )
+               {
+                 aGroupObject->SetName( newName.toLatin1().data() );
+                 if ( SMESH_Actor *anActor = SMESH::FindActorByEntry( IObject->getEntry() ) )
+                   anActor->setName( newName.toLatin1().data() );
+               }
+
                 updateObjBrowser();
               }
             }