//================================================================
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 )
{
}
// 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,
try {
SUIT_OverrideCursor wc;
ObjectList objects;
+
+ if ( !isWaitCursorEnabled() )
+ wc.suspend();
+
if ( !execute( objects ) || !getOperation()->IsDone() ) {
wc.suspend();
}
bool GEOMBase_Helper::hasCommand() const
{
bool res = (bool) myCommand;
- MESSAGE("hasCommand = "<<res)
return (bool)myCommand;
}
void redisplay ( GEOM::GEOM_Object_ptr, const bool = true, const bool = true );
virtual void displayPreview ( const bool display,
- const bool activate = false,
+ const bool activate = false,
const bool update = true,
const bool toRemoveFromEngine = true,
const double lineWidth = -1,
virtual void setIsOptimizedBrowsing( const bool theFlag );
virtual bool isOptimizedBrowsing() const;
+
+ virtual void setIsWaitCursorEnabled( const bool theFlag ) {myIsWaitCursorEnabled = theFlag;}
+ virtual bool isWaitCursorEnabled() const {return myIsWaitCursorEnabled ;}
private:
QString getEntry( GEOM::GEOM_Object_ptr ) const;
SUIT_Desktop* myDesktop;
bool myIsApplyAndClose;
bool myIsOptimizedBrowsing;
+ bool myIsWaitCursorEnabled;
};