Salome HOME
Merge branch 'hydro/imps_2015' into V7_dev
[modules/geom.git] / src / RepairGUI / RepairGUI_ShapeProcessDlg.cxx
index 3467da10ca1ce163705ad88d88882221a6d013be..71d3ce0f2cfc476c1eb4772ca4a10b106dff07b8 100755 (executable)
@@ -40,6 +40,7 @@
 #include <SUIT_ResourceMgr.h>
 #include <SUIT_MessageBox.h>
 #include <SALOME_ListIO.hxx>
+#include "utilities.h"
 
 #include <Basics_Utils.hxx>
 #include "utilities.h"
@@ -360,7 +361,7 @@ void RepairGUI_ShapeProcessDlg::init()
   //myOpList->setCurrentRow( myOpList->findItem( 0 );
   reset();
 
-  myStack->setCurrentIndex( 0 );
+  myOpList->setCurrentRow(0);
 
   initName( tr( "PROCESS_SHAPE_NEW_OBJ_NAME" ));
   selectionChanged();
@@ -958,6 +959,7 @@ void RepairGUI_ShapeProcessDlg::operatorChecked( QListWidgetItem * item )
 {
   if ( item && item->checkState() == Qt::Checked )
   {
+    item->setSelected(true);
     myStack->setCurrentIndex( myOpList->row( item ));
   }
   updateSelectAll();
@@ -989,3 +991,18 @@ void RepairGUI_ShapeProcessDlg::onSelectAll( int state )
   }
   myOpList->blockSignals( false );
 }
+
+//=================================================================================
+// function : getSourceObjects
+// purpose  : virtual method to get source objects
+//=================================================================================
+QList<GEOM::GeomObjPtr> RepairGUI_ShapeProcessDlg::getSourceObjects()
+{
+  QList<GEOM::GeomObjPtr> res;
+  GEOM::ListOfGO aListPtr(myObjects);
+  for (int i = 0; i < aListPtr.length(); i++) {
+    GEOM::GeomObjPtr aGeomObjPtr(aListPtr[i]);
+    res << aGeomObjPtr;
+  }
+  return res;
+}