Salome HOME
Double editor in table
[modules/hydro.git] / src / HYDROCurveCreator / CurveCreator_TreeView.cxx
index 800546cfd50cfc41395cea92e9a9a95d1f528ad8..c48eb510185e64da8fd76ee859f5b80a9b05edeb 100755 (executable)
@@ -382,7 +382,7 @@ void CurveCreator_TreeView::setSelectedSections( const QList<int>& theList )
     selectionModel()->clearSelection();
     for( int i = 0 ; i < theList.size() ; i++ ){
       QModelIndex aSectIndx = aModel->sectionIndex(theList[i]);
-      selectionModel()->select(aSectIndx, QItemSelectionModel::Select );
+      selectionModel()->select(aSectIndx, QItemSelectionModel::Select | QItemSelectionModel::Rows );
     }
   }
 }
@@ -487,3 +487,10 @@ void CurveCreator_TreeView::setCurve( CurveCreator_ICurve* theCurve )
     aModel->setCurve(theCurve);
   reset();
 }
+
+void CurveCreator_TreeView::reset()
+{
+  QList<int> aSelSections = getSelectedSections();
+  QTreeView::reset();
+  setSelectedSections(aSelSections);
+}