From 2272503509cdb238e2551367ebbe3a9a2edd9915 Mon Sep 17 00:00:00 2001 From: asl Date: Fri, 1 Dec 2017 14:27:52 +0300 Subject: [PATCH] refs #1461: draft patch for some simple acceleration --- src/HYDROGUI/HYDROGUI_BathymetrySelectionOp.cxx | 5 +++++ src/HYDROGUI/HYDROGUI_ShapeBathymetry.cxx | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) 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(); } -- 2.30.2