WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
mySelector(SMESH::GetViewWindow(theModule)->GetSelector()),
mySelectionMgr(SMESH::GetSelectionMgr(theModule)),
- myViewWindow(SMESH::GetViewWindow(theModule)),
mySMESHGUI(theModule),
myBusy(false)
{
- QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_DLG_REM_ELEMENT")));
- QPixmap image1 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
+ QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_REM_ELEMENT")));
+ QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
if (!name)
setName("SMESHGUI_RemoveElementsDlg");
this->move(x, y);
this->show(); /* displays Dialog */
- myViewWindow->SetSelectionMode(CellSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(CellSelection);
SelectionIntoArgument();
}
}
if (aResult) {
- SALOME_ListIO aList;
- aList.Append(myActor->getIO());
- mySelectionMgr->setSelectedObjects(aList, false);
+ myEditCurrentArgument->clear();
SMESH::UpdateView();
}
}
//=================================================================================
void SMESHGUI_RemoveElementsDlg::ClickOnCancel()
{
- mySelectionMgr->clearSelected();
- myViewWindow->SetSelectionMode(ActorSelection);
+ //mySelectionMgr->clearSelected();
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
reject();
if(myActor){
if(SMDS_Mesh* aMesh = myActor->GetObject()->GetMesh()){
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
- SALOME_ListIO aList;
- aList.Append(anIO);
- mySelectionMgr->setSelectedObjects(aList, false);
- TColStd_IndexedMapOfInteger selectedIndices;
TColStd_MapOfInteger newIndices;
- mySelector->GetIndex(anIO,selectedIndices);
QStringList aListId = QStringList::split(" ", theNewText, false);
for (int i = 0; i < aListId.count(); i++) {
if(const SMDS_MeshElement *anElem = aMesh->FindElement(aListId[i].toInt())) {
- if (selectedIndices.Add(anElem->GetID())) {
- newIndices.Add(anElem->GetID());
- }
+ newIndices.Add(anElem->GetID());
myNbOkElements++;
}
}
-
- if (newIndices.Extent() > 0){
- mySelector->AddOrRemoveIndex(anIO,newIndices,true);
- myViewWindow->highlight(anIO,true,true);
- }
+
+ mySelector->AddOrRemoveIndex(anIO,newIndices,false);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight(anIO,true,true);
}
}
-
+
if (myNbOkElements) {
buttonOk->setEnabled(true);
buttonApply->setEnabled(true);
}
-
+
myBusy = false;
}
mySMESHGUI->SetActiveDialogBox((QDialog*)this); // ??
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
SelectionIntoArgument(); // ??
}