X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_PolylineDlg.cxx;h=52087532823dc23305f6f3f65816ea7b7d54523a;hb=5cae7e874afd2fc1b6f61023e8ebd33a933db3c7;hp=40a831d80db3cab3a7a59f1fe96dfed29b8fc29d;hpb=a502bc91af765db8df39ed99c321af63631ec2c4;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_PolylineDlg.cxx b/src/HYDROGUI/HYDROGUI_PolylineDlg.cxx index 40a831d8..52087532 100755 --- a/src/HYDROGUI/HYDROGUI_PolylineDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_PolylineDlg.cxx @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -41,14 +42,22 @@ HYDROGUI_PolylineDlg::HYDROGUI_PolylineDlg( HYDROGUI_Module* theModule, const QS addLayout(aNameLayout); - myEditorWidget = - new CurveCreator_Widget( this, NULL ); + myEditorWidget = new CurveCreator_Widget( this, NULL ); + myEditorWidget->setInstantSketchingEnabled( true ); + addWidget( myEditorWidget, 3 ); - addWidget( myEditorWidget ); + myAddElementBox = new QGroupBox( tr( "ADD_ELEMENT" ), this ); + addWidget( myAddElementBox, 2 ); + + QBoxLayout* anAddElementLayout = new QVBoxLayout( myAddElementBox ); + anAddElementLayout->setMargin( 0 ); + anAddElementLayout->setSpacing( 5 ); connect( myEditorWidget, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) ); connect( myEditorWidget, SIGNAL( subOperationStarted(QWidget*) ), this, SLOT( processStartedSubOperation(QWidget*) ) ); connect( myEditorWidget, SIGNAL( subOperationFinished(QWidget*) ), this, SLOT( processFinishedSubOperation(QWidget*) ) ); + + myAddElementBox->hide(); } HYDROGUI_PolylineDlg::~HYDROGUI_PolylineDlg() @@ -58,13 +67,23 @@ HYDROGUI_PolylineDlg::~HYDROGUI_PolylineDlg() void HYDROGUI_PolylineDlg::processStartedSubOperation( QWidget* theWidget ) { myEditorWidget->setEnabled( false ); - activateWidget( theWidget ); + + QBoxLayout* anAddElementLayout = dynamic_cast( myAddElementBox->layout() ); + anAddElementLayout->addWidget( theWidget ); + + theWidget->show(); + myAddElementBox->show(); } void HYDROGUI_PolylineDlg::processFinishedSubOperation( QWidget* theWidget ) { myEditorWidget->setEnabled( true ); - activateWidget( 0 ); + + QBoxLayout* anAddElementLayout = dynamic_cast( myAddElementBox->layout() ); + anAddElementLayout->removeWidget( theWidget ); + + theWidget->hide(); + myAddElementBox->hide(); } void HYDROGUI_PolylineDlg::reset()