Salome HOME
lot 10 - warnings for DTM - untested
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_BathymetrySelectionOp.cxx
index 9786506dd70a346157cd5b4e80d65e1ac1ce33e8..dd5fb3cf0faeec51bdbb8ffbc704afde292179a3 100644 (file)
@@ -26,6 +26,7 @@
 #include <OCCViewer_ViewManager.h>
 #include <LightApp_Application.h>
 #include <QAction>
+#include <QApplication>
 
 HYDROGUI_BathymetrySelectionOp::HYDROGUI_BathymetrySelectionOp( HYDROGUI_Module* theModule )
 : HYDROGUI_Operation( theModule ), myIsActive( false )
@@ -46,6 +47,7 @@ void HYDROGUI_BathymetrySelectionOp::abortOperation()
   activateSelection( false );
 
   module()->action( BathymetrySelectionId )->setChecked( false );
+  module()->action( BathymetryTextId )->setChecked( false );
 }
 
 bool HYDROGUI_BathymetrySelectionOp::isValid( SUIT_Operation* theOtherOp ) const
@@ -89,6 +91,9 @@ void HYDROGUI_BathymetrySelectionOp::activateSelection( bool isActive )
   if( myIsActive==isActive )
     return;
 
+  getContext( module() )->ClearSelected(true);
+  qApp->setOverrideCursor( Qt::WaitCursor );
+  getContext( module() )->ClearSelected(true);
   Handle(AIS_InteractiveContext) ctx = getContext( module() );
   QList<Handle(HYDROGUI_BathymetryPrs)> baths = getShownBathymetries( module() );
   if( isActive )
@@ -115,4 +120,6 @@ void HYDROGUI_BathymetrySelectionOp::activateSelection( bool isActive )
   }
 
   myIsActive = isActive;
+
+  qApp->restoreOverrideCursor();
 }