Salome HOME
Merge remote branch 'origin/Doc_update_ver741' into V7_5_BR
[modules/gui.git] / src / OCCViewer / OCCViewer_ClippingDlg.cxx
index 40ee9ad4611b7746b5fe6d0a71b195eb4b0dac62..2c993287b88d4b1f749a61981607c80e007d97ea 100644 (file)
@@ -37,6 +37,8 @@
 #include "OCCViewer_ViewManager.h"
 #include "OCCViewer_ClipPlaneInteractor.h"
 
+#include <Basics_OCCTVersion.hxx>
+
 #include <V3d_View.hxx>
 #include <Visual3d_View.hxx>
 #include <Geom_Plane.hxx>
@@ -92,7 +94,17 @@ void getMinMaxFromContext( Handle(AIS_InteractiveContext) ic,
       if ( !aPrs->IsEmpty() && !aPrs->IsInfinite() ) {
         isFound = true;
         double xmin, ymin, zmin, xmax, ymax, zmax;
+#if OCC_VERSION_LARGE > 0x06070100
+       Bnd_Box aBox = aPrs->MinMaxValues();
+       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
         aXMin = qMin( aXMin, xmin );  aXMax = qMax( aXMax, xmax );
         aYMin = qMin( aYMin, ymin );  aYMax = qMax( aYMax, ymax );
         aZMin = qMin( aZMin, zmin );  aZMax = qMax( aZMax, zmax );
@@ -571,7 +583,7 @@ OCCViewer_ClippingDlg::OCCViewer_ClippingDlg(OCCViewer_ViewWindow* parent , OCCV
   buttonClose->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonClose );
 
-  QPushButton* buttonHelp = new QPushButton( tr( "SMESH_BUT_HELP" ), GroupButtons );
+  QPushButton* buttonHelp = new QPushButton( tr( "HELP" ), GroupButtons );
   buttonHelp->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonHelp );