]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Merge branch 'V7_main' of salome:modules/gui.git into V7_main
authorrnv <rnv@opencascade.com>
Tue, 18 Feb 2014 11:21:15 +0000 (15:21 +0400)
committerrnv <rnv@opencascade.com>
Tue, 18 Feb 2014 11:21:15 +0000 (15:21 +0400)
src/OCCViewer/OCCViewer_ClippingDlg.cxx

index fa290d94434ec0bd1f6a4bbbc7a9b7c8721e27b8..e1c46998ee79c9a13f7dde8666bd72901cc1a271 100644 (file)
@@ -305,7 +305,14 @@ void absolutePlaneToRelative( OCCViewer_ClipPlane& thePlane, Handle(AIS_Interact
   {
     case 0:
     {
-      if ( aDY.IsEqual( aPlaneN, Precision::Angular() ) )
+      if ( aDY.IsParallel( aPlaneN, Precision::Angular() ) )
+      {
+        anAng1 = 0.0;
+        anAng2 = 0.0;
+        break;
+      }
+
+      if ( aDX.IsParallel( aPlaneN, Precision::Angular() ) )
       {
         anAng1 = 0.0;
         anAng2 = 0.0;
@@ -331,7 +338,14 @@ void absolutePlaneToRelative( OCCViewer_ClipPlane& thePlane, Handle(AIS_Interact
     }
     case 1:
     {
-      if ( aDZ.IsEqual( aPlaneN, Precision::Angular() ) )
+      if ( aDZ.IsParallel( aPlaneN, Precision::Angular() ) )
+      {
+        anAng1 = 0.0;
+        anAng2 = 0.0;
+        break;
+      }
+
+      if ( aDY.IsParallel( aPlaneN, Precision::Angular() ) )
       {
         anAng1 = 0.0;
         anAng2 = 0.0;
@@ -357,7 +371,14 @@ void absolutePlaneToRelative( OCCViewer_ClipPlane& thePlane, Handle(AIS_Interact
     }
     case 2:
     {
-      if ( aDX.IsEqual( aPlaneN, Precision::Angular() ) )
+      if ( aDX.IsParallel( aPlaneN, Precision::Angular() ) )
+      {
+        anAng1 = 0.0;
+        anAng2 = 0.0;
+        break;
+      }
+
+      if ( aDZ.IsParallel( aPlaneN, Precision::Angular() ) )
       {
         anAng1 = 0.0;
         anAng2 = 0.0;
@@ -1286,7 +1307,7 @@ void OCCViewer_ClippingDlg::onSelectPlane ( int theIndex )
 */
 void OCCViewer_ClippingDlg::SetCurrentPlaneParam()
 {
-  if ( clipPlanesCount() == 0 || myIsSelectPlane )
+  if ( clipPlanesCount() == 0 || myIsSelectPlane || myBusy)
     return;
 
   int aCurPlaneIndex = ComboBoxPlanes->currentIndex();
@@ -1295,6 +1316,11 @@ void OCCViewer_ClippingDlg::SetCurrentPlaneParam()
 
   if ( aPlane.PlaneMode == Absolute )
   {
+    if( qFuzzyIsNull( SpinBox_Dx->value() ) && 
+        qFuzzyIsNull( SpinBox_Dy->value() ) && 
+        qFuzzyIsNull( SpinBox_Dz->value() ) ) {
+      return;
+    }
     aPlane.Orientation = CBAbsoluteOrientation->currentIndex();
     aPlane.X  = SpinBox_X->value();
     aPlane.Y  = SpinBox_Y->value();