]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
IPAL22925: TC6.5.0: scalar bar is built for presentation without Magnitude coloring TRIPOLI_323
authorouv <ouv@opencascade.com>
Fri, 27 Apr 2012 09:19:46 +0000 (09:19 +0000)
committerouv <ouv@opencascade.com>
Fri, 27 Apr 2012 09:19:46 +0000 (09:19 +0000)
src/VISU_I/VISU_MonoColorPrs_i.cc

index e3aaeaae492625cea4823ae290bc7def86bcc535..8fdf41016a887f95319214f4e73ed602fa85f3bf 100644 (file)
@@ -170,14 +170,15 @@ void VISU::MonoColorPrs_i::UpdateActor(VISU_ActorBase* theActor)
 {
   if(VISU_ScalarMapAct* anActor = dynamic_cast<VISU_ScalarMapAct*>(theActor)){
     if(IsColored()){
-      anActor->SetBarVisibility(true);
       GetPipeLine()->GetMapper()->SetScalarVisibility(1);
     }else{
-      anActor->SetBarVisibility(false);
       GetPipeLine()->GetMapper()->SetScalarVisibility(0);
       anActor->GetProperty()->SetColor(myColor.R,myColor.G,myColor.B);
     }
     TSuperClass::UpdateActor(theActor);
+
+    // this method should be called after TSuperClass::UpdateActor()
+    anActor->SetBarVisibility( IsBarVisible() && IsColored() );
   }
 }