Salome HOME
Minor changes.
[modules/hydro.git] / src / HYDROCurveCreator / CurveCreator_Widget.cxx
index af71520e178ac355e8bc459b3aa03cf3f61831ad..b595c2217d16d73f6481aae0e861c8dc92027260 100644 (file)
@@ -79,6 +79,7 @@
 CurveCreator_Widget::CurveCreator_Widget(QWidget* parent,
                                          CurveCreator_ICurve *theCurve,
                                          const int theActionFlags,
+                                         const QStringList& theCoordTitles,
                                          Qt::WindowFlags fl,
                                          int theLocalPointRowLimit )
 : QWidget(parent), myNewSectionEditor(NULL), myCurve(theCurve), mySection(0),
@@ -100,7 +101,7 @@ CurveCreator_Widget::CurveCreator_Widget(QWidget* parent,
   connect( mySectionView, SIGNAL(sectionEntered(int)), this, SLOT(onEditSection(int)) );
   connect( mySectionView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onContextMenu(QPoint)) );
 
-  myLocalPointView = new CurveCreator_TableView( myCurve, this );
+  myLocalPointView = new CurveCreator_TableView( myCurve, this, theCoordTitles );
   connect( myLocalPointView, SIGNAL( cellChanged( int, int ) ),
            this, SLOT( onCellChanged( int, int ) ) );
 
@@ -367,7 +368,9 @@ void CurveCreator_Widget::updateActionsStates()
         }
         break;
         case ModificationMode: {
-         anEnabledAct << CLOSE_SECTIONS_ID << UNCLOSE_SECTIONS_ID << SET_SECTIONS_POLYLINE_ID << SET_SECTIONS_SPLINE_ID;
+          if ( myNewSectionEditor->isEnableClosed() )
+            anEnabledAct << CLOSE_SECTIONS_ID << UNCLOSE_SECTIONS_ID;
+          anEnabledAct << SET_SECTIONS_POLYLINE_ID << SET_SECTIONS_SPLINE_ID;
           int aSectCnt = myCurve->getNbSections();
           if( aSectCnt > 0 )
             anEnabledAct << CLEAR_ALL_ID;