]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
refs #1461: draft patch for some simple acceleration
authorasl <asl@opencascade.com>
Fri, 1 Dec 2017 11:27:52 +0000 (14:27 +0300)
committerasl <asl@opencascade.com>
Fri, 1 Dec 2017 11:27:52 +0000 (14:27 +0300)
src/HYDROGUI/HYDROGUI_BathymetrySelectionOp.cxx
src/HYDROGUI/HYDROGUI_ShapeBathymetry.cxx

index 526c2c218cc6297754b470b4729cdd1c107afb16..165dcc88f7bd0d5981f978376e60eb0fae7c3d56 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 )
@@ -90,6 +91,8 @@ void HYDROGUI_BathymetrySelectionOp::activateSelection( bool isActive )
   if( myIsActive==isActive )
     return;
 
+  qApp->setOverrideCursor( Qt::WaitCursor );
+
   getContext( module() )->ClearSelected();
 
   Handle(AIS_InteractiveContext) ctx = getContext( module() );
@@ -118,4 +121,6 @@ void HYDROGUI_BathymetrySelectionOp::activateSelection( bool isActive )
   }
 
   myIsActive = isActive;
+
+  qApp->restoreOverrideCursor();
 }
index 4b1df859e948784af6174908d9bd15ff7c89c042..acdac05bf2e92ebef5ef34315f926e1b8d94817f 100644 (file)
@@ -263,7 +263,10 @@ void HYDROGUI_ShapeBathymetry::Rescale( double theMin, double theMax )
   setToUpdateColorScale( true );
 
   if( !getAISObjects().isEmpty() )
-    getAISObjects()[0]->Redisplay();
+  {
+    getContext()->RecomputePrsOnly( getAISObjects()[0] );
+    //getAISObjects()[0]->Redisplay();
+  }
 }
 
 void HYDROGUI_ShapeBathymetry::RescaleDefault()
@@ -313,6 +316,7 @@ void HYDROGUI_ShapeBathymetry::TextLabels( bool isOn )
 
   getContext()->ClearSelected();
   prs->SetTextLabels( selection );
-  prs->Redisplay();
+  getContext()->RecomputePrsOnly( prs );
+  //prs->Redisplay();
   getContext()->UpdateCurrentViewer();
 }