Salome HOME
[bos #40617][CEA] Preserve color with clipping plane
[modules/gui.git] / src / OCCViewer / OCCViewer_ClippingDlg.cxx
index bee978a53d547bebcfbfd01c8cdfd3b9f0c42466..72804a4f1efb381e91aeaffd30b591804987fef3 100644 (file)
@@ -281,7 +281,7 @@ void XYZToDistance ( const Handle(AIS_InteractiveContext)& theIC,
   double aDistance = aZmax;
 
   double aRelativeDistance = aLength > 0.01 ? aDistance / aLength : 0.0;
-  aRelativeDistance = qMin( aRelativeDistance, aLength );
+  aRelativeDistance = qMin( aRelativeDistance, 1.0 );
   aRelativeDistance = qMax( aRelativeDistance, 0.0 );
   theDistance = aRelativeDistance;
 }
@@ -978,6 +978,7 @@ void OCCViewer_ClippingDlg::erasePreview()
     }
   }
   myPreviewPlaneVector.clear();
+  myModel->updateTrihedron();
   myModel->update();
   myInteractor->setEnabled( false );
 }