From: dmv Date: Mon, 31 Aug 2009 07:18:00 +0000 (+0000) Subject: IPAL21345 SetBarOrientation works wrong in TUI X-Git-Tag: V4_1_0_maintainance_20090907 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6fcbfdb76afbb1141b37961bb16728d3e8f7180d;p=modules%2Fvisu.git IPAL21345 SetBarOrientation works wrong in TUI --- diff --git a/src/VISU_I/VISU_PointMap3d_i.cc b/src/VISU_I/VISU_PointMap3d_i.cc index 87e4825c..c76d3771 100644 --- a/src/VISU_I/VISU_PointMap3d_i.cc +++ b/src/VISU_I/VISU_PointMap3d_i.cc @@ -909,6 +909,13 @@ void VISU::PointMap3d_i::SetBarOrientation(VISU::ColoredPrs3dBase::Orientation t if(myBarOrientation == theBarOrientation) return; + if ( ( theBarOrientation == VISU::ColoredPrs3dBase::VERTICAL && myHeight < myWidth ) || + ( theBarOrientation == VISU::ColoredPrs3dBase::HORIZONTAL && myHeight > myWidth ) ) { + vtkFloatingPointType tmp = myHeight; + myHeight = myWidth; + myWidth = tmp; + } + myBarOrientation = theBarOrientation; }