aMesh = myActor->GetObject()->GetMesh();
if (aMesh) {
- SALOME_ListIO aList; aList.Append( myActor->getIO() );
- mySelectionMgr->setSelectedObjects( aList, false );
-
- TColStd_IndexedMapOfInteger selectedIndices;
TColStd_MapOfInteger newIndices;
- mySelector->GetIndex(myActor->getIO(), selectedIndices);
-
+
QStringList aListId = QStringList::split(" ", theNewText, false);
for (int i = 0; i < aListId.count(); i++) {
if( const SMDS_MeshNode * n = aMesh->FindNode( aListId[ i ].toInt() ) )
{
- if( selectedIndices.Add( n->GetID() ) )
- newIndices.Add( n->GetID() );
+ newIndices.Add( n->GetID() );
myNbOkNodes++;
}
}
- if( newIndices.Extent()>0 )
- {
- mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, true );
- myViewWindow->highlight( myActor->getIO(), true, true );
- }
+ mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
+ myViewWindow->highlight( myActor->getIO(), true, true );
+
bool aNodesOK = false;
if (myIsPoly && myElementType == SMDSAbs_Face && aListId.count() >=3 ){
myNbOkNodes = aListId.count();
if (GetConstructorId() == 0)
{
if ( aMesh ) {
- SALOME_ListIO aList; aList.Append( myActor->getIO() );
- mySelectionMgr->setSelectedObjects( aList );
-
- TColStd_IndexedMapOfInteger selectedIndices;
TColStd_MapOfInteger newIndices;
- mySelector->GetIndex( myActor->getIO(), selectedIndices);
-
+
QStringList aListId = QStringList::split( " ", theNewText, false);
for ( int i = 0; i < aListId.count(); i++ ) {
const SMDS_MeshNode * n = aMesh->FindNode( aListId[ i ].toInt() );
if ( n ) {
- if (selectedIndices.Add(n->GetID()))
- newIndices.Add(n->GetID());
+ newIndices.Add(n->GetID());
myNbOkElements++;
}
}
- if (newIndices.Extent() > 0){
- mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, true );
- myViewWindow->highlight( myActor->getIO(), true, true );
- }
-
+ mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
+ myViewWindow->highlight( myActor->getIO(), true, true );
+
if ( myNbOkElements>0 && aListId.count()>=3)
AddButton->setEnabled(true);
else
// check entered ids of faces and hilight them
QStringList aListId;
if ( aMesh ) {
- SALOME_ListIO aList; aList.Append( myActor->getIO() );
- mySelectionMgr->setSelectedObjects( aList );
-
- TColStd_IndexedMapOfInteger selectedIndices;
TColStd_MapOfInteger newIndices;
- mySelector->GetIndex( myActor->getIO(), selectedIndices);
-
+
aListId = QStringList::split( " ", theNewText, false);
for ( int i = 0; i < aListId.count(); i++ ) {
const SMDS_MeshElement * e = aMesh->FindElement( aListId[ i ].toInt() );
if ( e ) {
- if (selectedIndices.Add(e->GetID()))
- newIndices.Add(e->GetID());
+ newIndices.Add(e->GetID());
myNbOkElements++;
}
}
- if (newIndices.Extent() > 0){
- mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, true );
- myViewWindow->highlight( myActor->getIO(), true, true );
- }
-
+ mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
+ myViewWindow->highlight( myActor->getIO(), true, true );
+
if ( myNbOkElements ) {
if (aListId.count()>1){
buttonOk->setEnabled( true );
if (aMesh) {
QStringList aListId = QStringList::split(" ", theNewText, false);
-
- SALOME_ListIO aList;
- aList.Append(anActor->getIO());
- mySelectionMgr->setSelectedObjects(aList, false);
-
- TColStd_IndexedMapOfInteger selectedIndices;
+
TColStd_MapOfInteger newIndices;
- mySelector->GetIndex(anActor->getIO(), selectedIndices);
-
+
for (int i = 0; i < aListId.count(); i++) {
const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
- if (e && e->GetType() == (myType == Type_2d ? SMDSAbs_Face : SMDSAbs_Volume)) {
- if (selectedIndices.Add(e->GetID())) {
- newIndices.Add(e->GetID());
- }
- }
- }
- if (newIndices.Extent() > 0)
- {
- mySelector->AddOrRemoveIndex( anActor->getIO(), newIndices, true);
- myViewWindow->highlight( anActor->getIO(), true, true );
+ if (e && e->GetType() == (myType == Type_2d ? SMDSAbs_Face : SMDSAbs_Volume))
+ newIndices.Add(e->GetID());
}
+ mySelector->AddOrRemoveIndex( anActor->getIO(), newIndices, false);
+ myViewWindow->highlight( anActor->getIO(), true, true );
}
myBusy = false;
if(const SMDS_MeshElement *anElem = aMesh->FindElement(theNewText.toInt())) {
TColStd_MapOfInteger aListInd;
aListInd.Add(anElem->GetID());
- mySelector->AddOrRemoveIndex(anIO,aListInd, true);
+ mySelector->AddOrRemoveIndex(anIO,aListInd, false);
myViewWindow->highlight(anIO,true,true);
+
+ onSelectionDone();
}
}
}
send->clear();
if (aMesh) {
- //mySelectionMgr->clearSelected();
- //mySelectionMgr->AddIObject(myActor->getIO());
- SALOME_ListIO aList;
- aList.Append(myActor->getIO());
- mySelectionMgr->setSelectedObjects(aList, false);
-
- TColStd_IndexedMapOfInteger selectedIndices;
TColStd_MapOfInteger newIndices;
- mySelector->GetIndex( myActor->getIO(), selectedIndices);
-
+
if (GetConstructorId() != 3 || (send != LineEdit1 && send != LineEdit4)) {
SMESH::SetPointRepresentation(true);
const SMDS_MeshNode * n = aMesh->FindNode(theNewText.toInt());
if (n) {
- //if (!mySelectionMgr->IsIndexSelected(myActor->getIO(), n->GetID())) {
- if (selectedIndices.Add(n->GetID())) {
- //mySelectionMgr->AddOrRemoveIndex (myActor->getIO(), n->GetID(), true);
- newIndices.Add(n->GetID());
- mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, true);
- myViewWindow->highlight( myActor->getIO(), true, true );
- }
-
+ newIndices.Add(n->GetID());
+ mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false);
+ myViewWindow->highlight( myActor->getIO(), true, true );
+
if (send == LineEdit1)
myOk1 = true;
else if (send == LineEdit2)
for (int i = 0; i < aListId.count(); i++) {
const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
- if (e) {
- //if (!mySelectionMgr->IsIndexSelected(myActor->getIO(), e->GetID())) {
- if (selectedIndices.Add(e->GetID())) {
- //mySelectionMgr->AddOrRemoveIndex (myActor->getIO(), e->GetID(), true);
- newIndices.Add(e->GetID());
- }
+ if (e)
+ newIndices.Add(e->GetID());
+
if (!isEvenOneExists)
isEvenOneExists = true;
- }
- }
-
- if (newIndices.Extent() > 0)
- {
- mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, true);
- myViewWindow->highlight( myActor->getIO(), true, true );
}
+
+ mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false);
+ myViewWindow->highlight( myActor->getIO(), true, true );
+
if (isEvenOneExists) {
if (send == LineEdit1)
myOk1 = true;