4x, 5x : Selection with rectangle is impossible for mesh elements if Submesh or Group is showed.

This commit is contained in:
dmv 2008-10-17 11:01:19 +00:00
parent d1a145272b
commit 40af73a362

View File

@ -586,7 +586,7 @@ void SMESHGUI_MultiEditDlg::onSelectionDone()
} else { } else {
aNameEdit->clear(); aNameEdit->clear();
} }
} else if (nbSel == 1) { } else if (nbSel > 0) {
QString aListStr = ""; QString aListStr = "";
Handle(SALOME_InteractiveObject) anIO = aList.First(); Handle(SALOME_InteractiveObject) anIO = aList.First();
int aNbItems = SMESH::GetNameOfSelectedElements(mySelector,anIO,aListStr); int aNbItems = SMESH::GetNameOfSelectedElements(mySelector,anIO,aListStr);
@ -599,11 +599,10 @@ void SMESHGUI_MultiEditDlg::onSelectionDone()
anItem->setSelected(true); anItem->setSelected(true);
} }
} }
myMesh = SMESH::GetMeshByIO(anIO); myMesh = SMESH::GetMeshByIO(anIO);
} }
if (nbSel == 1) { if (nbSel > 0) {
myActor = SMESH::FindActorByEntry(aList.First()->getEntry()); myActor = SMESH::FindActorByEntry(aList.First()->getEntry());
if (!myActor) if (!myActor)
myActor = SMESH::FindActorByObject(myMesh); myActor = SMESH::FindActorByObject(myMesh);
@ -731,7 +730,7 @@ void SMESHGUI_MultiEditDlg::onAddBtn()
TColStd_IndexedMapOfInteger toBeAdded; TColStd_IndexedMapOfInteger toBeAdded;
if (!mySubmeshChk->isChecked() && !myGroupChk->isChecked()) { if (!mySubmeshChk->isChecked() && !myGroupChk->isChecked()) {
if (nbSelected == 1) if (nbSelected > 0)
mySelector->GetIndex(aList.First(),toBeAdded); mySelector->GetIndex(aList.First(),toBeAdded);
} else if (mySubmeshChk->isChecked()) { } else if (mySubmeshChk->isChecked()) {
SALOME_ListIteratorOfListIO anIter(aList); SALOME_ListIteratorOfListIO anIter(aList);
@ -808,7 +807,7 @@ void SMESHGUI_MultiEditDlg::updateButtons()
if (isToAll || if (isToAll ||
myMesh->_is_nil() || myMesh->_is_nil() ||
aList.Extent() != 1 || aList.Extent() < 1 ||
(SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(aList.First())->_is_nil() && (SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(aList.First())->_is_nil() &&
SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(aList.First())->_is_nil() && SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(aList.First())->_is_nil() &&
SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(aList.First())->_is_nil())) SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(aList.First())->_is_nil()))