mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 08:50:35 +05:00
The selections of elements corrected.
This commit is contained in:
parent
783b5a717c
commit
81248260b7
@ -698,9 +698,7 @@ void SMESHGUI_ExtrusionAlongPathDlg::onTextChange (const QString& theNewText)
|
|||||||
QStringList aListId = QStringList::split(" ", theNewText, false);
|
QStringList aListId = QStringList::split(" ", theNewText, false);
|
||||||
bool bOk;
|
bool bOk;
|
||||||
const Handle(SALOME_InteractiveObject)& anIO = myMeshActor->getIO();
|
const Handle(SALOME_InteractiveObject)& anIO = myMeshActor->getIO();
|
||||||
TColStd_IndexedMapOfInteger selectedIndices;
|
|
||||||
TColStd_MapOfInteger newIndices;
|
TColStd_MapOfInteger newIndices;
|
||||||
mySelector->GetIndex(anIO, selectedIndices);
|
|
||||||
for (int i = 0; i < aListId.count(); i++) {
|
for (int i = 0; i < aListId.count(); i++) {
|
||||||
long ind = aListId[ i ].toLong(&bOk);
|
long ind = aListId[ i ].toLong(&bOk);
|
||||||
if (bOk) {
|
if (bOk) {
|
||||||
@ -709,18 +707,13 @@ void SMESHGUI_ExtrusionAlongPathDlg::onTextChange (const QString& theNewText)
|
|||||||
// check also type of element
|
// check also type of element
|
||||||
bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
|
bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
|
||||||
Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
|
Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
|
||||||
if (typeMatch) {
|
if (typeMatch)
|
||||||
if (selectedIndices.Add(e->GetID())) {
|
newIndices.Add(e->GetID());
|
||||||
newIndices.Add(e->GetID());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (newIndices.Extent() > 0) {
|
mySelector->AddOrRemoveIndex(anIO, newIndices, false);
|
||||||
mySelector->AddOrRemoveIndex(anIO, newIndices, true);
|
myViewWindow->highlight( anIO, true, true );
|
||||||
myViewWindow->highlight( anIO, true, true );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if (send == StartPointLineEdit &&
|
} else if (send == StartPointLineEdit &&
|
||||||
myEditCurrentArgument == StartPointLineEdit) {
|
myEditCurrentArgument == StartPointLineEdit) {
|
||||||
@ -742,14 +735,10 @@ void SMESHGUI_ExtrusionAlongPathDlg::onTextChange (const QString& theNewText)
|
|||||||
const SMDS_MeshNode* n = aMesh->FindNode(ind);
|
const SMDS_MeshNode* n = aMesh->FindNode(ind);
|
||||||
if (n) {
|
if (n) {
|
||||||
//if (!mySelectionMgr->IsIndexSelected(aPathActor->getIO(), n->GetID())) {
|
//if (!mySelectionMgr->IsIndexSelected(aPathActor->getIO(), n->GetID())) {
|
||||||
TColStd_IndexedMapOfInteger selectedIndices;
|
|
||||||
TColStd_MapOfInteger newIndices;
|
TColStd_MapOfInteger newIndices;
|
||||||
mySelector->GetIndex(aPathActor->getIO(), selectedIndices);
|
newIndices.Add(n->GetID());
|
||||||
if (selectedIndices.Add(n->GetID())) {
|
mySelector->AddOrRemoveIndex( aPathActor->getIO(), newIndices, false );
|
||||||
newIndices.Add(n->GetID());
|
myViewWindow->highlight( aPathActor->getIO(), true, true );
|
||||||
mySelector->AddOrRemoveIndex( aPathActor->getIO(), newIndices, true );
|
|
||||||
myViewWindow->highlight( aPathActor->getIO(), true, true );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user