Salome HOME
Fix for the bug #255: VTK viewer is not updated after modification of objects.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_PolylineDlg.cxx
index de14235fd5f3fefa5b1bdff0cbb6b0baf92e54d8..abbd6ae4850f1c7f001de1df568cbb0b18dd33aa 100755 (executable)
@@ -37,7 +37,7 @@ HYDROGUI_PolylineDlg::HYDROGUI_PolylineDlg( HYDROGUI_Module* theModule, const QS
 : HYDROGUI_InputPanel( theModule, theTitle ), myName(NULL)
 {
   QHBoxLayout* aNameLayout = new QHBoxLayout();
-  QLabel* aNameLabel = new QLabel(tr("CURVE_NAME_TLT"), this);
+  QLabel* aNameLabel = new QLabel(tr("POLYLINE_NAME_TLT"), this);
   aNameLayout->addWidget(aNameLabel);
   myName = new QLineEdit(this);
   aNameLayout->addWidget(myName);
@@ -55,7 +55,7 @@ HYDROGUI_PolylineDlg::HYDROGUI_PolylineDlg( HYDROGUI_Module* theModule, const QS
   anAddElementLayout->setSpacing( 5 );
 
   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();
@@ -70,10 +70,11 @@ void HYDROGUI_PolylineDlg::setOCCViewer( OCCViewer_Viewer* theViewer )
   myEditorWidget->setOCCViewer( theViewer );
 }
 
-void HYDROGUI_PolylineDlg::processStartedSubOperation( QWidget* theWidget )
+void HYDROGUI_PolylineDlg::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 );
 
@@ -116,11 +117,6 @@ QList<int> HYDROGUI_PolylineDlg::getSelectedSections()
   return myEditorWidget->getSelectedSections();
 }
 
-QList< QPair< int, int > > HYDROGUI_PolylineDlg::getSelectedPoints()
-{
-  return myEditorWidget->getSelectedPoints();
-}
-
 /**
  * Redirect the delete action to editor widget
  */