]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
IPAL21345 SetBarOrientation works wrong in TUI V4_1_0_maintainance_20090907 V4_1_0_maintainance_20090914 V4_1_0_maintainance_20090922
authordmv <dmv@opencascade.com>
Mon, 31 Aug 2009 07:18:00 +0000 (07:18 +0000)
committerdmv <dmv@opencascade.com>
Mon, 31 Aug 2009 07:18:00 +0000 (07:18 +0000)
src/VISU_I/VISU_PointMap3d_i.cc

index 87e4825ccd331151f63ed4eb8a5d4e218bf65f7c..c76d3771201b5d6b6d3a5247c449193382167cd8 100644 (file)
@@ -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;
 }