From: asl Date: Fri, 1 Dec 2017 11:27:52 +0000 (+0300) Subject: refs #1461: draft patch for some simple acceleration X-Git-Tag: v2.1.1__salome84~7^2~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2272503509cdb238e2551367ebbe3a9a2edd9915;p=modules%2Fhydro.git refs #1461: draft patch for some simple acceleration --- diff --git a/src/HYDROGUI/HYDROGUI_BathymetrySelectionOp.cxx b/src/HYDROGUI/HYDROGUI_BathymetrySelectionOp.cxx index 526c2c21..165dcc88 100644 --- a/src/HYDROGUI/HYDROGUI_BathymetrySelectionOp.cxx +++ b/src/HYDROGUI/HYDROGUI_BathymetrySelectionOp.cxx @@ -26,6 +26,7 @@ #include #include #include +#include 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(); } diff --git a/src/HYDROGUI/HYDROGUI_ShapeBathymetry.cxx b/src/HYDROGUI/HYDROGUI_ShapeBathymetry.cxx index 4b1df859..acdac05b 100644 --- a/src/HYDROGUI/HYDROGUI_ShapeBathymetry.cxx +++ b/src/HYDROGUI/HYDROGUI_ShapeBathymetry.cxx @@ -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(); }