Salome HOME
Join modifications from branch OCC_debug_for_3_2_0b1
[modules/visu.git] / src / VVTK / VVTK_MainWindow.cxx
index e292f1b6f70022460ee5397cd35faeb9493b869f..9b2e2df08b9ebf3676c56abea380177b583c4710 100644 (file)
@@ -172,7 +172,7 @@ void VVTK_MainWindow::onDumpView()
     fmt = "JPEG";
 
   QApplication::setOverrideCursor( Qt::waitCursor );
-  bool res = img.save( fileName, fmt.latin1() );
+  img.save( fileName, fmt.latin1() );
   QApplication::restoreOverrideCursor();
 }
 
@@ -301,8 +301,7 @@ VVTK_MainWindow1
   myPickingAction->addTo( myPtsToolBar );
   connect(myPickingAction, SIGNAL(toggled(bool)), this, SLOT(OnSelectionModeSwitch(bool)));
 
-  myPickingDlg = new VVTK_PickingDlg( this, "PickingDlg" );
-  myPickingDlg->SetAction( myPickingAction );
+  myPickingDlg = new VVTK_PickingDlg( myPickingAction, this, "PickingDlg" );
 
   // Plane/Sphere Segmentation
   aPixmap = theResourceMgr->loadPixmap("VISU",tr("ICON_VVTK_PLANE_SEGMENTATION_SWITCH"));
@@ -386,6 +385,9 @@ void
 VVTK_MainWindow1
 ::OnSelectionModeSwitch(bool theIsSelectionOn)
 {
+  if ( theIsSelectionOn && !isVisible() )
+    return;
+  
   Selection_Mode aSelectionMode = SelectionMode();
   if(theIsSelectionOn && aSelectionMode != GaussPointSelection)
     SetSelectionMode(GaussPointSelection);