mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-23 20:10:33 +05:00
Added a method to disable waiting cursor in the preview operation
This commit is contained in:
parent
1757fe1487
commit
1468abed08
@ -89,7 +89,7 @@ GEOM::GEOM_Gen_ptr GEOMBase_Helper::getGeomEngine()
|
|||||||
//================================================================
|
//================================================================
|
||||||
GEOMBase_Helper::GEOMBase_Helper( SUIT_Desktop* desktop )
|
GEOMBase_Helper::GEOMBase_Helper( SUIT_Desktop* desktop )
|
||||||
: myDesktop( desktop ), myViewWindow( 0 ), myDisplayer( 0 ), myCommand( 0 ), isPreview( false ),
|
: 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
|
// Purpose : Method for displaying preview based on execute() results
|
||||||
//================================================================
|
//================================================================
|
||||||
void GEOMBase_Helper::displayPreview( const bool display,
|
void GEOMBase_Helper::displayPreview( const bool display,
|
||||||
const bool activate,
|
const bool activate,
|
||||||
const bool update,
|
const bool update,
|
||||||
const bool toRemoveFromEngine,
|
const bool toRemoveFromEngine,
|
||||||
const double lineWidth,
|
const double lineWidth,
|
||||||
@ -279,6 +279,10 @@ void GEOMBase_Helper::displayPreview( const bool display,
|
|||||||
try {
|
try {
|
||||||
SUIT_OverrideCursor wc;
|
SUIT_OverrideCursor wc;
|
||||||
ObjectList objects;
|
ObjectList objects;
|
||||||
|
|
||||||
|
if ( !isWaitCursorEnabled() )
|
||||||
|
wc.suspend();
|
||||||
|
|
||||||
if ( !execute( objects ) || !getOperation()->IsDone() ) {
|
if ( !execute( objects ) || !getOperation()->IsDone() ) {
|
||||||
wc.suspend();
|
wc.suspend();
|
||||||
}
|
}
|
||||||
@ -766,7 +770,6 @@ bool GEOMBase_Helper::commitCommand( const char* )
|
|||||||
bool GEOMBase_Helper::hasCommand() const
|
bool GEOMBase_Helper::hasCommand() const
|
||||||
{
|
{
|
||||||
bool res = (bool) myCommand;
|
bool res = (bool) myCommand;
|
||||||
MESSAGE("hasCommand = "<<res)
|
|
||||||
return (bool)myCommand;
|
return (bool)myCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ protected:
|
|||||||
void redisplay ( GEOM::GEOM_Object_ptr, const bool = true, const bool = true );
|
void redisplay ( GEOM::GEOM_Object_ptr, const bool = true, const bool = true );
|
||||||
|
|
||||||
virtual void displayPreview ( const bool display,
|
virtual void displayPreview ( const bool display,
|
||||||
const bool activate = false,
|
const bool activate = false,
|
||||||
const bool update = true,
|
const bool update = true,
|
||||||
const bool toRemoveFromEngine = true,
|
const bool toRemoveFromEngine = true,
|
||||||
const double lineWidth = -1,
|
const double lineWidth = -1,
|
||||||
@ -187,6 +187,9 @@ protected:
|
|||||||
|
|
||||||
virtual void setIsOptimizedBrowsing( const bool theFlag );
|
virtual void setIsOptimizedBrowsing( const bool theFlag );
|
||||||
virtual bool isOptimizedBrowsing() const;
|
virtual bool isOptimizedBrowsing() const;
|
||||||
|
|
||||||
|
virtual void setIsWaitCursorEnabled( const bool theFlag ) {myIsWaitCursorEnabled = theFlag;}
|
||||||
|
virtual bool isWaitCursorEnabled() const {return myIsWaitCursorEnabled ;}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString getEntry( GEOM::GEOM_Object_ptr ) const;
|
QString getEntry( GEOM::GEOM_Object_ptr ) const;
|
||||||
@ -206,6 +209,7 @@ private:
|
|||||||
SUIT_Desktop* myDesktop;
|
SUIT_Desktop* myDesktop;
|
||||||
bool myIsApplyAndClose;
|
bool myIsApplyAndClose;
|
||||||
bool myIsOptimizedBrowsing;
|
bool myIsOptimizedBrowsing;
|
||||||
|
bool myIsWaitCursorEnabled;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user