Salome HOME
Remove debug information.
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_GroupDlg.cxx
index 5ec1935cdeebf2f032b04c0842aa089ae04b2db1..25ecdabccecc76348254f05c5c62cf497ee74a9a 100644 (file)
@@ -91,7 +91,8 @@ SMESHGUI_GroupDlg::SMESHGUI_GroupDlg( SMESHGUI* theModule, const char* name,
      mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
      myViewWindow( SMESH::GetViewWindow( theModule ) ),
      mySelector( myViewWindow->GetSelector() ),
-     myIsBusy( false )
+     myIsBusy( false ),
+     myActor( 0 )
 {
   if (!name) setName("SMESHGUI_GroupDlg");
   initDialog(true);
@@ -149,7 +150,7 @@ void SMESHGUI_GroupDlg::initDialog(bool create)
   myCreate = create;
   myCurrentLineEdit = 0;
 
-  QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
+  QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
 
   if (create)
     setCaption(tr("SMESH_CREATE_GROUP_TITLE"));
@@ -744,7 +745,7 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
 
       myElements->clear();
 
-      if (aNbSel == 0 ) {
+      if (aNbSel != 1 ) {
         myGroup = SMESH::SMESH_Group::_nil();
         myMesh = SMESH::SMESH_Mesh::_nil();
         myIsBusy = false;
@@ -805,7 +806,7 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
       return;
 
     } else if (myCurrentLineEdit == myGeomGroupLine) {
-      if (aNbSel == 0) {
+      if (aNbSel != 1) {
         myGeomGroup = GEOM::GEOM_Object::_nil();
         myIsBusy = false;
         return;
@@ -885,7 +886,7 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
     updateButtons();
 
   } else {
-    if (aNbSel == 1) {
+    if (aNbSel == 1 && myActor ) {
       QString aListStr = "";
       int aNbItems = 0;
       if (myTypeId == 0) {