Salome HOME
Fix for Bug IPAL8945
[modules/visu.git] / src / VISUGUI / VisuGUI_CutLinesDlg.cxx
index 1db03f8f6ce1e0355aa12aa2a35a6ca2f6a9b60a..a9983bf396bc30b2772be4eae45a0fa39e263874 100644 (file)
@@ -541,7 +541,7 @@ void VisuGUI_CutLinesDlg::updateGlyphs(bool update){
 
   for(int i=0; i<3; i++) aBoundCenter[i] = (bounds[i*2] + bounds[i*2+1])/2.0;
   for(int i=0; i<3; i++){ 
-    if (myAllCurvesInvertedCheck->isChecked())
+    if (!myAllCurvesInvertedCheck->isChecked())
       aSecondPnt[i] = aBasePnt[i] + aDirLn[i];
     else
       aSecondPnt[i] = -aBasePnt[i] - aDirLn[i];
@@ -801,6 +801,7 @@ void VisuGUI_CutLinesDlg::accept()
       }
     }
     VisuGUI::application()->objectBrowser()->updateTree();*/
+    myScalarPane->deletePreview();
     deletePlanes();
     QDialog::accept();
     //  }
@@ -812,6 +813,7 @@ void VisuGUI_CutLinesDlg::reject()
     myPrs->RemoveFromStudy();
     VisuGUI::application()->objectBrowser()->updateTree();
   }*/
+  myScalarPane->deletePreview();
   deletePlanes();
   QDialog::reject();
 }
@@ -835,7 +837,14 @@ void VisuGUI_CutLinesDlg::onPreviewCheck (bool thePreview)
  */
 void VisuGUI_CutLinesDlg::onAllCurvesInvertedCheck(bool theInvert)
 {
-  myCutLines->SetAllCurvesInverted(theInvert);
+  if (myAllCurvesInvertedCheck->isChecked()){
+    myCutLines->SetAllCurvesInverted(true);
+    myPrs->SetAllCurvesInverted(true);
+  }
+  else {
+    myCutLines->SetAllCurvesInverted(false);
+    myPrs->SetAllCurvesInverted(false);
+  }
   updateGlyphs(true);
 }