mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-01 03:25:36 +05:00
PAL18352, PAL19290: Conflict in objects selections when switching modules
+ virtual bool isSelectionCompatible();
This commit is contained in:
parent
46000eb32e
commit
0958758e5e
@ -3039,6 +3039,30 @@ void SMESHGUI::initialize( CAM_Application* app )
|
|||||||
this, SLOT( onViewManagerActivated( SUIT_ViewManager* ) ) );
|
this, SLOT( onViewManagerActivated( SUIT_ViewManager* ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Return true if SMESH or GEOM objects are selected.
|
||||||
|
* Is called form LightApp_Module::activateModule() which clear selection if
|
||||||
|
* not isSelectionCompatible()
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool SMESHGUI::isSelectionCompatible()
|
||||||
|
{
|
||||||
|
bool isCompatible = true;
|
||||||
|
SALOME_ListIO selected;
|
||||||
|
if ( LightApp_SelectionMgr *Sel = selectionMgr() )
|
||||||
|
Sel->selectedObjects( selected );
|
||||||
|
|
||||||
|
SALOME_ListIteratorOfListIO It( selected );
|
||||||
|
for ( ; isCompatible && It.More(); It.Next())
|
||||||
|
isCompatible =
|
||||||
|
( strcmp("GEOM", It.Value()->getComponentDataType()) == 0 ) ||
|
||||||
|
( strcmp("SMESH", It.Value()->getComponentDataType()) == 0 );
|
||||||
|
|
||||||
|
return isCompatible;
|
||||||
|
}
|
||||||
|
|
||||||
bool SMESHGUI::activateModule( SUIT_Study* study )
|
bool SMESHGUI::activateModule( SUIT_Study* study )
|
||||||
{
|
{
|
||||||
bool res = SalomeApp_Module::activateModule( study );
|
bool res = SalomeApp_Module::activateModule( study );
|
||||||
|
@ -136,6 +136,8 @@ protected:
|
|||||||
|
|
||||||
virtual LightApp_Operation* createOperation( const int ) const;
|
virtual LightApp_Operation* createOperation( const int ) const;
|
||||||
|
|
||||||
|
virtual bool isSelectionCompatible();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void OnEditDelete();
|
void OnEditDelete();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user