X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FHYDROGUI%2FHYDROGUI_VTKPrsDisplayer.cxx;h=20901f2b6c9dd78e10be7a8656b53d06bcc743b5;hb=b8b330bd3b77a53aa65978028660880d7b32412f;hp=a3d00e2f5c348aa4e5c8dc9800dd0fb4b0399c04;hpb=441d80aa0206954cf5369eb99ecb394a5a7808b8;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.cxx b/src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.cxx index a3d00e2f..20901f2b 100644 --- a/src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.cxx +++ b/src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.cxx @@ -1,12 +1,8 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// +// Copyright (C) 2014-2015 EDF-R&D // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -33,7 +29,7 @@ #include #include #include -#include +//#include #include #include #include @@ -132,7 +128,7 @@ void HYDROGUI_VTKPrsDisplayer::EraseAll( const int theViewerId ) SVTK_Viewer* aViewer = module()->getVTKViewer( theViewerId ); if( aViewer ) { - aViewer->EraseAll( true ); + aViewer->EraseAll( 0, true ); module()->removeViewVTKPrs( (size_t)aViewer ); EraseScalarBar( theViewerId ); } @@ -435,6 +431,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 ); }