myViewWindow( SMESH::GetViewWindow( theModule ) ),
mySelector( myViewWindow->GetSelector() )
{
- QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_DLG_EDGE")));
- QPixmap image1 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_DLG_TRIANGLE")));
- QPixmap image2 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
+ SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI );
+ QPixmap image0 ( mgr->loadPixmap("SMESH", tr("ICON_DLG_EDGE")));
+ QPixmap image1 ( mgr->loadPixmap("SMESH", tr("ICON_DLG_TRIANGLE")));
+ QPixmap image2 ( mgr->loadPixmap("SMESH", tr("ICON_SELECT")));
if (!name)
setName("SMESHGUI_RevolutionDlg");
if (aMesh) {
if (send == LineEditElements) {
- //mySelectionMgr->clearSelected();
- //mySelectionMgr->AddIObject(myActor->getIO());
- SALOME_ListIO aList;
- aList.Append(myActor->getIO());
- mySelectionMgr->setSelectedObjects(aList, false);
+ Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
- 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_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());
- }
- myNbOkElements++;
- }
- }
-
- if (newIndices.Extent() > 0)
- {
- mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, true);
- myViewWindow->highlight( myActor->getIO(), true, true );
+ if (e)
+ newIndices.Add(e->GetID());
+ myNbOkElements++;
}
+ mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false);
+ myViewWindow->highlight( myActor->getIO(), true, true );
+
myElementsId = theNewText;
}
}