From 1468abed08a815d69b4def5820b72178a4f7bdc2 Mon Sep 17 00:00:00 2001 From: rnc Date: Fri, 16 Mar 2012 15:48:25 +0000 Subject: [PATCH] Added a method to disable waiting cursor in the preview operation --- src/GEOMBase/GEOMBase_Helper.cxx | 9 ++++++--- src/GEOMBase/GEOMBase_Helper.h | 6 +++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/GEOMBase/GEOMBase_Helper.cxx b/src/GEOMBase/GEOMBase_Helper.cxx index 04a0be7b4..151f62277 100755 --- a/src/GEOMBase/GEOMBase_Helper.cxx +++ b/src/GEOMBase/GEOMBase_Helper.cxx @@ -89,7 +89,7 @@ GEOM::GEOM_Gen_ptr GEOMBase_Helper::getGeomEngine() //================================================================ GEOMBase_Helper::GEOMBase_Helper( SUIT_Desktop* desktop ) : myDesktop( desktop ), myViewWindow( 0 ), myDisplayer( 0 ), myCommand( 0 ), isPreview( false ), - myIsApplyAndClose( false ), myIsOptimizedBrowsing( false ) + myIsApplyAndClose( false ), myIsOptimizedBrowsing( false ), myIsWaitCursorEnabled( true ) { } @@ -253,7 +253,7 @@ void GEOMBase_Helper::redisplay( GEOM::GEOM_Object_ptr object, // Purpose : Method for displaying preview based on execute() results //================================================================ void GEOMBase_Helper::displayPreview( const bool display, - const bool activate, + const bool activate, const bool update, const bool toRemoveFromEngine, const double lineWidth, @@ -279,6 +279,10 @@ void GEOMBase_Helper::displayPreview( const bool display, try { SUIT_OverrideCursor wc; ObjectList objects; + + if ( !isWaitCursorEnabled() ) + wc.suspend(); + if ( !execute( objects ) || !getOperation()->IsDone() ) { wc.suspend(); } @@ -766,7 +770,6 @@ bool GEOMBase_Helper::commitCommand( const char* ) bool GEOMBase_Helper::hasCommand() const { bool res = (bool) myCommand; - MESSAGE("hasCommand = "<