Salome HOME
PAL9878 - selection lost after some operations
authorasl <asl@opencascade.com>
Fri, 25 Nov 2005 14:06:27 +0000 (14:06 +0000)
committerasl <asl@opencascade.com>
Fri, 25 Nov 2005 14:06:27 +0000 (14:06 +0000)
src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx
src/SMESHGUI/SMESHGUI_SewingDlg.cxx

index ed4acc2598eb63ef5fb0225f76204a18b5666ed0..157a05b0fc8c3a04b29a0e02cec9fe97ceabb7c9 100644 (file)
@@ -382,6 +382,8 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ConstructorsClicked(int constructorId)
 {
   //disconnect(mySelectionMgr, 0, this, 0);
 
 {
   //disconnect(mySelectionMgr, 0, this, 0);
 
+  SALOME_ListIO io;
+  mySelectionMgr->selectedObjects( io );
   SALOME_ListIO aList;
   mySelectionMgr->setSelectedObjects( aList );
   myEditCurrentArgument->clear();
   SALOME_ListIO aList;
   mySelectionMgr->setSelectedObjects( aList );
   myEditCurrentArgument->clear();
@@ -439,6 +441,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ConstructorsClicked(int constructorId)
     }
   
   //connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
     }
   
   //connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+  mySelectionMgr->setSelectedObjects( io );
 }
 
 //=================================================================================
 }
 
 //=================================================================================
@@ -523,8 +526,8 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
          }
        }
       
          }
        }
       
-      SALOME_ListIO aList;
-      mySelectionMgr->setSelectedObjects( aList );
+      //SALOME_ListIO aList;
+      //mySelectionMgr->setSelectedObjects( aList );
       mySimulation->SetVisibility(false);
       SMESH::UpdateView();
       ConstructorsClicked( GetConstructorId() );
       mySimulation->SetVisibility(false);
       SMESH::UpdateView();
       ConstructorsClicked( GetConstructorId() );
@@ -550,8 +553,8 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnOk()
 void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnCancel()
 {
   mySelectionMgr->clearFilters();
 void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnCancel()
 {
   mySelectionMgr->clearFilters();
-  SALOME_ListIO aList;
-  mySelectionMgr->setSelectedObjects( aList );
+  //SALOME_ListIO aList;
+  //mySelectionMgr->setSelectedObjects( aList );
   SMESH::SetPointRepresentation(false);
   mySimulation->SetVisibility(false);
   if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
   SMESH::SetPointRepresentation(false);
   mySimulation->SetVisibility(false);
   if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
index 383e3277f05a66d1779fbee9c90defd6a24e2084..eed4a15ac51e6e179721759cc8196e7e8800f59a 100644 (file)
@@ -357,6 +357,8 @@ void SMESHGUI_SewingDlg::Init()
 void SMESHGUI_SewingDlg::ConstructorsClicked (int constructorId)
 {
   disconnect(mySelectionMgr, 0, this, 0);
 void SMESHGUI_SewingDlg::ConstructorsClicked (int constructorId)
 {
   disconnect(mySelectionMgr, 0, this, 0);
+  SALOME_ListIO io;
+  mySelectionMgr->selectedObjects( io );
   mySelectionMgr->clearSelected();
   LineEdit1->setText("");
   LineEdit2->setText("");
   mySelectionMgr->clearSelected();
   LineEdit1->setText("");
   LineEdit2->setText("");
@@ -476,6 +478,7 @@ void SMESHGUI_SewingDlg::ConstructorsClicked (int constructorId)
   }
 
   connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
   }
 
   connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+  mySelectionMgr->setSelectedObjects( io );
 }
 
 //=================================================================================
 }
 
 //=================================================================================