Salome HOME
Bug #261: Problems with selection of GEOM objects in HYDRO module after opening of...
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ProfileDlg.cxx
index 4952ce856ee8d8151e64165914d2bfda6b3d5497..e4725a2a174115a69f966747d9eaf6d5f5550bda 100644 (file)
@@ -57,7 +57,8 @@ HYDROGUI_ProfileDlg::HYDROGUI_ProfileDlg( HYDROGUI_Module* theModule, const QStr
   addLayout(aNameLayout);
 
   int anActionFlags = 
-    CurveCreator_Widget::DisableNewSection | CurveCreator_Widget::DisableDetectionMode;
+    CurveCreator_Widget::DisableNewSection | CurveCreator_Widget::DisableDetectionMode |
+    CurveCreator_Widget::DisableClosedSection;
   myEditorWidget = new CurveCreator_Widget( this, NULL, anActionFlags );
   addWidget( myEditorWidget, 3 );
 
@@ -94,7 +95,7 @@ HYDROGUI_ProfileDlg::HYDROGUI_ProfileDlg( HYDROGUI_Module* theModule, const QStr
   myEditorWidget->setOCCViewer( aViewer );
 
   connect( myEditorWidget, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) );
-  connect( myEditorWidget, SIGNAL( subOperationStarted(QWidget*) ), this, SLOT( processStartedSubOperation(QWidget*) ) );
+  connect( myEditorWidget, SIGNAL( subOperationStarted(QWidget*, bool) ), this, SLOT( processStartedSubOperation(QWidget*, bool) ) );
   connect( myEditorWidget, SIGNAL( subOperationFinished(QWidget*) ), this, SLOT( processFinishedSubOperation(QWidget*) ) );
 
   myAddElementBox->hide();
@@ -153,11 +154,6 @@ QList<int> HYDROGUI_ProfileDlg::getSelectedSections()
   return myEditorWidget->getSelectedSections();
 }
 
-QList< QPair< int, int > > HYDROGUI_ProfileDlg::getSelectedPoints()
-{
-  return myEditorWidget->getSelectedPoints();
-}
-
 /**
  * Redirect the delete action to editor widget
  */
@@ -174,10 +170,11 @@ bool HYDROGUI_ProfileDlg::deleteEnabled()
   return myEditorWidget->removeEnabled();
 }
 
-void HYDROGUI_ProfileDlg::processStartedSubOperation( QWidget* theWidget )
+void HYDROGUI_ProfileDlg::processStartedSubOperation( QWidget* theWidget, bool theIsEdit )
 {
   myEditorWidget->setEnabled( false );
 
+  myAddElementBox->setTitle( theIsEdit ? tr( "EDIT_ELEMENT" ) : tr( "ADD_ELEMENT" ) );
   QBoxLayout* anAddElementLayout = dynamic_cast<QBoxLayout*>( myAddElementBox->layout() );
   anAddElementLayout->addWidget( theWidget );