From 9f7b45d044e701442d0b370e9779299d25a5d44c Mon Sep 17 00:00:00 2001 From: asl Date: Wed, 17 Sep 2014 11:44:49 +0000 Subject: [PATCH] refs #453: scalar bar is invisible --- src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.cxx b/src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.cxx index b096a067..97815262 100644 --- a/src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.cxx +++ b/src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.cxx @@ -398,6 +398,10 @@ void HYDROGUI_VTKPrsDisplayer::createScalarBar( const int theViewId ) aScalarBar->SetNumberOfLabels( NB_COLORS * 0.75 ); aScalarBar->SetWidth( aScalarBar->GetWidth() / 1.5 ); aScalarBar->SetTextureGridWidth( aScalarBar->GetTextureGridWidth() * 4. ); + aScalarBar->SetTitle( " " ); + // The call of SetTitle() with dummy string is a workaround necessary + // to avoid the problem with uninitialized variables in VTK scalar bar actor + // which leads to incorrect (very big) size of the VTK scalar bar presentation aTable->Delete(); myScalarBars.insert( theViewId, aScalarBar ); } -- 2.39.2