mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-29 03:00:32 +05:00
Fix for the 21110: EDF 1714 GEOM: Low efficiency of the explode compared with "create a vertex on curve" issue.
This commit is contained in:
parent
4830ecf8d1
commit
d5971b8b43
@ -260,7 +260,9 @@ bool EntityGUI_SubShapeDlg::ClickOnApply()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isOk = onAccept();
|
setIsDisableBrowsing( true );
|
||||||
|
bool isOk = onAccept( true, true, false );
|
||||||
|
setIsDisableBrowsing( false );
|
||||||
|
|
||||||
// restore selection, corresponding to current selection mode
|
// restore selection, corresponding to current selection mode
|
||||||
SubShapeToggled();
|
SubShapeToggled();
|
||||||
@ -667,6 +669,9 @@ int EntityGUI_SubShapeDlg::getSelectedSubshapes (TColStd_IndexedMapOfInteger& th
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void EntityGUI_SubShapeDlg::activateSelection()
|
void EntityGUI_SubShapeDlg::activateSelection()
|
||||||
{
|
{
|
||||||
|
bool isApply = ((QPushButton*)sender() == buttonApply());
|
||||||
|
|
||||||
|
if(!isApply)
|
||||||
erasePreview(false);
|
erasePreview(false);
|
||||||
|
|
||||||
// local selection
|
// local selection
|
||||||
@ -692,6 +697,7 @@ void EntityGUI_SubShapeDlg::activateSelection()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!isApply) {
|
||||||
int prevDisplayMode = aDisplayer->SetDisplayMode(0);
|
int prevDisplayMode = aDisplayer->SetDisplayMode(0);
|
||||||
|
|
||||||
SUIT_ViewWindow* aViewWindow = 0;
|
SUIT_ViewWindow* aViewWindow = 0;
|
||||||
@ -731,6 +737,7 @@ void EntityGUI_SubShapeDlg::activateSelection()
|
|||||||
aDisplayer->UpdateViewer();
|
aDisplayer->UpdateViewer();
|
||||||
aDisplayer->SetDisplayMode(prevDisplayMode);
|
aDisplayer->SetDisplayMode(prevDisplayMode);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
globalSelection(GEOM_ALLSHAPES);
|
globalSelection(GEOM_ALLSHAPES);
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,8 @@ 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 ), myIsWaitCursorEnabled( true )
|
myIsApplyAndClose( false ), myIsOptimizedBrowsing( false ), myIsWaitCursorEnabled( true ),
|
||||||
|
myIsDisableBrowsing(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -812,7 +813,7 @@ bool GEOMBase_Helper::checkViewWindow()
|
|||||||
// It perfroms user input validation, then it
|
// It perfroms user input validation, then it
|
||||||
// performs a proper operation and manages transactions, etc.
|
// performs a proper operation and manages transactions, etc.
|
||||||
//================================================================
|
//================================================================
|
||||||
bool GEOMBase_Helper::onAccept( const bool publish, const bool useTransaction )
|
bool GEOMBase_Helper::onAccept( const bool publish, const bool useTransaction, bool erasePreviewFlag )
|
||||||
{
|
{
|
||||||
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
|
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
|
||||||
if ( !appStudy )
|
if ( !appStudy )
|
||||||
@ -838,6 +839,7 @@ bool GEOMBase_Helper::onAccept( const bool publish, const bool useTransaction )
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(erasePreviewFlag)
|
||||||
erasePreview( false );
|
erasePreview( false );
|
||||||
|
|
||||||
bool result = false;
|
bool result = false;
|
||||||
@ -899,7 +901,8 @@ bool GEOMBase_Helper::onAccept( const bool publish, const bool useTransaction )
|
|||||||
commitCommand();
|
commitCommand();
|
||||||
updateObjBrowser();
|
updateObjBrowser();
|
||||||
if( SUIT_Application* anApp = SUIT_Session::session()->activeApplication() ) {
|
if( SUIT_Application* anApp = SUIT_Session::session()->activeApplication() ) {
|
||||||
if( LightApp_Application* aLightApp = dynamic_cast<LightApp_Application*>( anApp ) )
|
LightApp_Application* aLightApp = dynamic_cast<LightApp_Application*>( anApp );
|
||||||
|
if(aLightApp && !isDisableBrowsing() )
|
||||||
aLightApp->browseObjects( anEntryList, isApplyAndClose(), isOptimizedBrowsing() );
|
aLightApp->browseObjects( anEntryList, isApplyAndClose(), isOptimizedBrowsing() );
|
||||||
anApp->putInfo( QObject::tr("GEOM_PRP_DONE") );
|
anApp->putInfo( QObject::tr("GEOM_PRP_DONE") );
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ protected:
|
|||||||
SalomeApp_Study* getStudy () const;
|
SalomeApp_Study* getStudy () const;
|
||||||
bool checkViewWindow ();
|
bool checkViewWindow ();
|
||||||
|
|
||||||
bool onAccept( const bool publish = true, const bool useTransaction = true );
|
bool onAccept( const bool publish = true, const bool useTransaction = true, bool erasePreviewFlag = true);
|
||||||
// This method should be called from "OK" button handler.
|
// This method should be called from "OK" button handler.
|
||||||
// <publish> == true means that objects returned by execute()
|
// <publish> == true means that objects returned by execute()
|
||||||
// should be published in a study.
|
// should be published in a study.
|
||||||
@ -190,6 +190,9 @@ protected:
|
|||||||
|
|
||||||
virtual void setIsWaitCursorEnabled( const bool theFlag ) {myIsWaitCursorEnabled = theFlag;}
|
virtual void setIsWaitCursorEnabled( const bool theFlag ) {myIsWaitCursorEnabled = theFlag;}
|
||||||
virtual bool isWaitCursorEnabled() const {return myIsWaitCursorEnabled ;}
|
virtual bool isWaitCursorEnabled() const {return myIsWaitCursorEnabled ;}
|
||||||
|
virtual void setIsDisableBrowsing( const bool theFlag ) { myIsDisableBrowsing = theFlag; }
|
||||||
|
virtual bool isDisableBrowsing() const { return myIsDisableBrowsing; }
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString getEntry( GEOM::GEOM_Object_ptr ) const;
|
QString getEntry( GEOM::GEOM_Object_ptr ) const;
|
||||||
@ -210,6 +213,8 @@ private:
|
|||||||
bool myIsApplyAndClose;
|
bool myIsApplyAndClose;
|
||||||
bool myIsOptimizedBrowsing;
|
bool myIsOptimizedBrowsing;
|
||||||
bool myIsWaitCursorEnabled;
|
bool myIsWaitCursorEnabled;
|
||||||
|
bool myIsDisableBrowsing; //This flag enable/disable selection
|
||||||
|
//in the Object Browser newly created objects.
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user