mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-18 10:40:36 +05:00
0021014: EDF 1583 SMESH: Improvement of the Python Dump for the creation of groups
fix selection/visualization mode at changing the group type
This commit is contained in:
parent
e6c056f8c0
commit
34fc026192
@ -728,12 +728,12 @@ void SMESHGUI_GroupDlg::onTypeChanged (int id)
|
|||||||
if (myTypeId != id) {
|
if (myTypeId != id) {
|
||||||
myElements->clear();
|
myElements->clear();
|
||||||
myTypeId = id;
|
myTypeId = id;
|
||||||
|
if ( myGrpTypeId == 0 && myCurrentLineEdit == 0)
|
||||||
|
setSelectionMode(id);
|
||||||
|
else
|
||||||
|
setSelectionMode( mySelectionMode++ ); // update according to mySelectionMode
|
||||||
|
|
||||||
int curSelMode = mySelectionMode;
|
|
||||||
mySelectionMode = grpNoSelection;
|
|
||||||
setSelectionMode( curSelMode );
|
|
||||||
onObjectSelectionChanged();
|
onObjectSelectionChanged();
|
||||||
|
|
||||||
setShowEntityMode();
|
setShowEntityMode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -745,13 +745,13 @@ void SMESHGUI_GroupDlg::onTypeChanged (int id)
|
|||||||
void SMESHGUI_GroupDlg::onGrpTypeChanged (int id)
|
void SMESHGUI_GroupDlg::onGrpTypeChanged (int id)
|
||||||
{
|
{
|
||||||
if (myGrpTypeId != id) {
|
if (myGrpTypeId != id) {
|
||||||
|
myGrpTypeId = id;
|
||||||
myWGStack->setCurrentIndex( id );
|
myWGStack->setCurrentIndex( id );
|
||||||
myName->blockSignals(true);
|
myName->blockSignals(true);
|
||||||
myName->setText(myOldName);
|
myName->setText(myOldName);
|
||||||
myName->blockSignals(false);
|
myName->blockSignals(false);
|
||||||
onSelectGeomGroup(id == 1);
|
onSelectGeomGroup(id != 0);
|
||||||
}
|
}
|
||||||
myGrpTypeId = id;
|
|
||||||
updateButtons();
|
updateButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -774,26 +774,25 @@ void SMESHGUI_GroupDlg::setSelectionMode (int theMode)
|
|||||||
if (myMesh->_is_nil())
|
if (myMesh->_is_nil())
|
||||||
return;
|
return;
|
||||||
SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
|
SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
|
||||||
bool isSelectAll = mySelectAll->isChecked() || !myAllowElemsModif->isChecked();
|
bool isSelectAll = mySelectAll->isChecked() || !myAllowElemsModif->isChecked() || myGrpTypeId != 0;
|
||||||
if (mySelectionMode != theMode) {
|
if (mySelectionMode != theMode) {
|
||||||
// [PAL10408] mySelectionMgr->clearSelected();
|
// [PAL10408] mySelectionMgr->clearSelected();
|
||||||
mySelectionMgr->clearFilters();
|
mySelectionMgr->clearFilters();
|
||||||
if (myActorsList.count() > 0) {
|
|
||||||
QListIterator<SMESH_Actor*> it( myActorsList );
|
if (myActorsList.count() > 0)
|
||||||
while ( it.hasNext() )
|
for (QListIterator<SMESH_Actor*> it( myActorsList ); it.hasNext(); )
|
||||||
it.next()->SetPointRepresentation(false);
|
it.next()->SetPointRepresentation(false);
|
||||||
}
|
else
|
||||||
else {
|
|
||||||
SMESH::SetPointRepresentation(false);
|
SMESH::SetPointRepresentation(false);
|
||||||
}
|
|
||||||
switch (theMode) {
|
switch (theMode) {
|
||||||
case grpNodeSelection:
|
case grpNodeSelection:
|
||||||
if (myActorsList.count() > 0) {
|
if ( myGrpTypeId == 0 ) // standalone
|
||||||
QListIterator<SMESH_Actor*> it( myActorsList );
|
{
|
||||||
while ( it.hasNext() )
|
if (myActorsList.count() > 0)
|
||||||
|
for (QListIterator<SMESH_Actor*> it( myActorsList ); it.hasNext(); )
|
||||||
it.next()->SetPointRepresentation(true);
|
it.next()->SetPointRepresentation(true);
|
||||||
}
|
else
|
||||||
else {
|
|
||||||
SMESH::SetPointRepresentation(true);
|
SMESH::SetPointRepresentation(true);
|
||||||
}
|
}
|
||||||
if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : NodeSelection);
|
if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : NodeSelection);
|
||||||
@ -1583,7 +1582,7 @@ void SMESHGUI_GroupDlg::onSelectGroup(bool on)
|
|||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : (onSelectGeomGroup)
|
// function : (onSelectGeomGroup)
|
||||||
// purpose : Called when selection in 3D view or ObjectBrowser is changed
|
// purpose : Called when group type changed. on == "on group" or "on filter"
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_GroupDlg::onSelectGeomGroup(bool on)
|
void SMESHGUI_GroupDlg::onSelectGeomGroup(bool on)
|
||||||
{
|
{
|
||||||
@ -1594,8 +1593,13 @@ void SMESHGUI_GroupDlg::onSelectGeomGroup(bool on)
|
|||||||
else if (mySelectGroup->isChecked()) {
|
else if (mySelectGroup->isChecked()) {
|
||||||
mySelectGroup->setChecked(false);
|
mySelectGroup->setChecked(false);
|
||||||
}
|
}
|
||||||
|
if ( myGrpTypeId == 1 ) { // on group
|
||||||
myCurrentLineEdit = myGeomGroupLine;
|
myCurrentLineEdit = myGeomGroupLine;
|
||||||
updateGeomPopup();
|
updateGeomPopup();
|
||||||
|
}
|
||||||
|
else { // on filter
|
||||||
|
myCurrentLineEdit = 0;
|
||||||
|
}
|
||||||
setSelectionMode(grpAllSelection);
|
setSelectionMode(grpAllSelection);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1604,7 +1608,7 @@ void SMESHGUI_GroupDlg::onSelectGeomGroup(bool on)
|
|||||||
myGeomGroupLine->setText( "" );
|
myGeomGroupLine->setText( "" );
|
||||||
myCurrentLineEdit = 0;
|
myCurrentLineEdit = 0;
|
||||||
if (myTypeId != -1)
|
if (myTypeId != -1)
|
||||||
setSelectionMode(myTypeId);
|
setSelectionMode( myTypeId );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user