Salome HOME
OCC dev (IR-2014-10-23) porting part 2
[modules/gui.git] / src / OCCViewer / OCCViewer_ClippingDlg.cxx
index d6359071f567dd7c73a164d6ceb3023f18a825f3..2c993287b88d4b1f749a61981607c80e007d97ea 100644 (file)
@@ -96,12 +96,12 @@ void getMinMaxFromContext( Handle(AIS_InteractiveContext) ic,
         double xmin, ymin, zmin, xmax, ymax, zmax;
 #if OCC_VERSION_LARGE > 0x06070100
        Bnd_Box aBox = aPrs->MinMaxValues();
-       xmin = aBox.CornerMin().X();
-       ymin = aBox.CornerMin().Y();
-       zmin = aBox.CornerMin().Z();
-       xmax = aBox.CornerMax().X();
-       ymax = aBox.CornerMax().Y();
-       zmax = aBox.CornerMax().Z();
+       xmin = aBox.IsVoid() ? RealFirst() : aBox.CornerMin().X();
+       ymin = aBox.IsVoid() ? RealFirst() : aBox.CornerMin().Y();
+       zmin = aBox.IsVoid() ? RealFirst() : aBox.CornerMin().Z();
+       xmax = aBox.IsVoid() ? RealLast()  : aBox.CornerMax().X();
+       ymax = aBox.IsVoid() ? RealLast()  : aBox.CornerMax().Y();
+       zmax = aBox.IsVoid() ? RealLast()  : aBox.CornerMax().Z();
 #else
         aPrs->MinMaxValues( xmin, ymin, zmin, xmax, ymax, zmax );
 #endif