Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for bug ( IPAL9603 3.0.0(current2707): SMESH ? edit mesh does not work ).
[modules/smesh.git]
/
src
/
SMESHGUI
/
SMESHGUI_GroupDlg.cxx
diff --git
a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx
b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx
index 5ec1935cdeebf2f032b04c0842aa089ae04b2db1..262e33c5e412b4adc68b8cd5c16bfedaece7e801 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_GroupDlg.cxx
+++ b/
src/SMESHGUI/SMESHGUI_GroupDlg.cxx
@@
-89,9
+89,8
@@
SMESHGUI_GroupDlg::SMESHGUI_GroupDlg( SMESHGUI* theModule, const char* name,
WStyle_Title | WStyle_SysMenu | WDestructiveClose),
mySMESHGUI( theModule ),
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
WStyle_Title | WStyle_SysMenu | WDestructiveClose),
mySMESHGUI( theModule ),
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() ),
- myIsBusy( false )
+ myIsBusy( false ),
+ myActor( 0 )
{
if (!name) setName("SMESHGUI_GroupDlg");
initDialog(true);
{
if (!name) setName("SMESHGUI_GroupDlg");
initDialog(true);
@@
-104,6
+103,8
@@
SMESHGUI_GroupDlg::SMESHGUI_GroupDlg( SMESHGUI* theModule, const char* name,
myGeomGroupLine->setEnabled(false);
}
myGeomGroupLine->setEnabled(false);
}
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
+
/* Move widget on the botton right corner of main widget */
int x, y ;
mySMESHGUI->DefineDlgPosition(this, x, y);
/* Move widget on the botton right corner of main widget */
int x, y ;
mySMESHGUI->DefineDlgPosition(this, x, y);
@@
-120,11
+121,12
@@
SMESHGUI_GroupDlg::SMESHGUI_GroupDlg( SMESHGUI* theModule, const char* name,
WStyle_Title | WStyle_SysMenu | WDestructiveClose),
mySMESHGUI( theModule ),
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
WStyle_Title | WStyle_SysMenu | WDestructiveClose),
mySMESHGUI( theModule ),
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() ),
myIsBusy( false )
{
if (!name) setName("SMESHGUI_GroupDlg");
myIsBusy( false )
{
if (!name) setName("SMESHGUI_GroupDlg");
+
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
+
initDialog(false);
if (!theGroup->_is_nil())
init(theGroup);
initDialog(false);
if (!theGroup->_is_nil())
init(theGroup);
@@
-132,7
+134,7
@@
SMESHGUI_GroupDlg::SMESHGUI_GroupDlg( SMESHGUI* theModule, const char* name,
mySelectSubMesh->setEnabled(false);
mySelectGroup->setEnabled(false);
}
mySelectSubMesh->setEnabled(false);
mySelectGroup->setEnabled(false);
}
-
+
/* Move widget on the botton right corner of main widget */
int x, y ;
mySMESHGUI->DefineDlgPosition(this, x, y);
/* Move widget on the botton right corner of main widget */
int x, y ;
mySMESHGUI->DefineDlgPosition(this, x, y);
@@
-149,7
+151,7
@@
void SMESHGUI_GroupDlg::initDialog(bool create)
myCreate = create;
myCurrentLineEdit = 0;
myCreate = create;
myCurrentLineEdit = 0;
- QPixmap image0 (SMESH
GUI::resourceMgr(
)->loadPixmap("SMESH", tr("ICON_SELECT")));
+ QPixmap image0 (SMESH
::GetResourceMgr( mySMESHGUI
)->loadPixmap("SMESH", tr("ICON_SELECT")));
if (create)
setCaption(tr("SMESH_CREATE_GROUP_TITLE"));
if (create)
setCaption(tr("SMESH_CREATE_GROUP_TITLE"));
@@
-542,19
+544,24
@@
void SMESHGUI_GroupDlg::setSelectionMode (int theMode)
myActor->SetPointRepresentation(true);
else
SMESH::SetPointRepresentation(true);
myActor->SetPointRepresentation(true);
else
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
break;
case 1:
break;
case 1:
- myViewWindow->SetSelectionMode(EdgeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(EdgeSelection);
break;
case 2:
break;
case 2:
- myViewWindow->SetSelectionMode(FaceSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(FaceSelection);
break;
default:
break;
default:
- myViewWindow->SetSelectionMode(VolumeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(VolumeSelection);
}
} else {
}
} else {
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
if (theMode == 4)
mySelectionMgr->installFilter(mySubMeshFilter);
else if (theMode == 5)
if (theMode == 4)
mySelectionMgr->installFilter(mySubMeshFilter);
else if (theMode == 5)
@@
-706,7
+713,8
@@
void SMESHGUI_GroupDlg::onListSelectionChanged()
SALOME_ListIO aList;
aList.Append(myActor->getIO());
mySelectionMgr->setSelectedObjects(aList,false);
SALOME_ListIO aList;
aList.Append(myActor->getIO());
mySelectionMgr->setSelectedObjects(aList,false);
- myViewWindow->highlight( myActor->getIO(), true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( myActor->getIO(), true, true );
}
myIsBusy = false;
}
}
myIsBusy = false;
}
@@
-744,7
+752,7
@@
void SMESHGUI_GroupDlg::onObjectSelectionChanged()
myElements->clear();
myElements->clear();
- if (aNbSel
== 0
) {
+ if (aNbSel
!= 1
) {
myGroup = SMESH::SMESH_Group::_nil();
myMesh = SMESH::SMESH_Mesh::_nil();
myIsBusy = false;
myGroup = SMESH::SMESH_Group::_nil();
myMesh = SMESH::SMESH_Mesh::_nil();
myIsBusy = false;
@@
-805,7
+813,7
@@
void SMESHGUI_GroupDlg::onObjectSelectionChanged()
return;
} else if (myCurrentLineEdit == myGeomGroupLine) {
return;
} else if (myCurrentLineEdit == myGeomGroupLine) {
- if (aNbSel
== 0
) {
+ if (aNbSel
!= 1
) {
myGeomGroup = GEOM::GEOM_Object::_nil();
myIsBusy = false;
return;
myGeomGroup = GEOM::GEOM_Object::_nil();
myIsBusy = false;
return;
@@
-885,7
+893,7
@@
void SMESHGUI_GroupDlg::onObjectSelectionChanged()
updateButtons();
} else {
updateButtons();
} else {
- if (aNbSel == 1) {
+ if (aNbSel == 1
&& myActor
) {
QString aListStr = "";
int aNbItems = 0;
if (myTypeId == 0) {
QString aListStr = "";
int aNbItems = 0;
if (myTypeId == 0) {
@@
-1391,7
+1399,8
@@
void SMESHGUI_GroupDlg::onClose()
}
mySelectionMgr->clearSelected();
}
mySelectionMgr->clearSelected();
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->clearFilters();
mySMESHGUI->ResetState();
mySelectionMgr->clearFilters();
mySMESHGUI->ResetState();