From d028f9519d64d97a06f4b9086b9f46a8b756f62e Mon Sep 17 00:00:00 2001 From: ouv Date: Wed, 27 May 2009 12:02:45 +0000 Subject: [PATCH] Issue 0019818: EDF 703 SMESH VISU : Display Mesh Groups names in viewer (as a caption) --- src/VISU_I/VISU_ColoredPrs3d_i.cc | 22 ++++++++++++++++++++++ src/VISU_I/VISU_ColoredPrs3d_i.hh | 4 ++++ src/VISU_I/VISU_ScalarMap_i.cc | 14 -------------- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.cc b/src/VISU_I/VISU_ColoredPrs3d_i.cc index a09c1cc1..dcf28086 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3d_i.cc @@ -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 diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.hh b/src/VISU_I/VISU_ColoredPrs3d_i.hh index 5548bfed..877b0003 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.hh +++ b/src/VISU_I/VISU_ColoredPrs3d_i.hh @@ -474,6 +474,10 @@ namespace VISU void SameAs(const Prs3d_i* theOrigin); + virtual + void + UpdateActor(VISU_ActorBase* theActor); + virtual bool IsBoldTitle(); diff --git a/src/VISU_I/VISU_ScalarMap_i.cc b/src/VISU_I/VISU_ScalarMap_i.cc index c3b8bdd0..7afea4d4 100644 --- a/src/VISU_I/VISU_ScalarMap_i.cc +++ b/src/VISU_I/VISU_ScalarMap_i.cc @@ -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); } -- 2.39.2