]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Issue 0019818: EDF 703 SMESH VISU : Display Mesh Groups names in viewer (as a caption)
authorouv <ouv@opencascade.com>
Wed, 27 May 2009 12:02:45 +0000 (12:02 +0000)
committerouv <ouv@opencascade.com>
Wed, 27 May 2009 12:02:45 +0000 (12:02 +0000)
src/VISU_I/VISU_ColoredPrs3d_i.cc
src/VISU_I/VISU_ColoredPrs3d_i.hh
src/VISU_I/VISU_ScalarMap_i.cc

index a09c1cc1e15f14416097039dbb82d6b7fa51bab0..dcf280865181f765135c6447cc63c5452ff0eb29 100644 (file)
@@ -747,6 +747,28 @@ VISU::ColoredPrs3d_i
   }
 }
   
+//----------------------------------------------------------------------------
+void
+VISU::ColoredPrs3d_i
+::UpdateActor(VISU_ActorBase* theActor) 
+{
+  bool isOnGroups = myGroupNames.size() > 0;
+  if ( isOnGroups )
+  {
+    QStringList aList;
+    TGroupNames::const_iterator anIter = myGroupNames.begin();
+    for ( ; anIter != myGroupNames.end(); anIter++ )
+    {
+      const std::string aGroupName = *anIter;
+      aList << QString( aGroupName.c_str() );
+    }
+    theActor->SetNameActorText( aList.join( "\n" ).toLatin1().constData() );
+  }
+  theActor->SetIsDisplayNameActor( isOnGroups );
+
+  TSuperClass::UpdateActor(theActor);
+}
+
 //----------------------------------------------------------------------------
 CORBA::Long 
 VISU::ColoredPrs3d_i
index 5548bfed2babce9ff50e46c98e0bbe7b605fad63..877b00034fda655ded547f62cdfec4f79d362d95 100644 (file)
@@ -474,6 +474,10 @@ namespace VISU
     void
     SameAs(const Prs3d_i* theOrigin);
 
+    virtual
+    void
+    UpdateActor(VISU_ActorBase* theActor);
+
     virtual 
     bool
     IsBoldTitle();
index c3b8bdd07b69e9a228a613402af89e24a4be504d..7afea4d43e4915d8d748aa3ea9bce7c87f974852 100644 (file)
@@ -517,20 +517,6 @@ VISU::ScalarMap_i
       GetValLblFontColor( anRGB[ 0 ], anRGB[ 1 ], anRGB[ 2 ] );
       aProp->SetColor( anRGB[ 0 ], anRGB[ 1 ], anRGB[ 2 ] );
     }
-
-    bool isOnGroups = myGroupNames.size() > 0;
-    if ( isOnGroups )
-    {
-      QStringList aList;
-      TGroupNames::const_iterator anIter = myGroupNames.begin();
-      for ( ; anIter != myGroupNames.end(); anIter++ )
-      {
-       const std::string aGroupName = *anIter;
-       aList << QString( aGroupName.c_str() );
-      }
-      anActor->SetNameActorText( aList.join( "\n" ).toLatin1().constData() );
-    }
-    anActor->SetIsDisplayNameActor( isOnGroups );
   }
   TSuperClass::UpdateActor(theActor);
 }