From: ouv Date: Mon, 16 Sep 2013 14:08:22 +0000 (+0000) Subject: Bug 20: View – Windows: name of windows are wrong. X-Git-Tag: BR_hydro_v_0_1~25 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9814d3a41ad9334fd47d0410d3cc88a24ea18164;p=modules%2Fhydro.git Bug 20: View – Windows: name of windows are wrong. --- diff --git a/src/HYDROGUI/HYDROGUI_Operation.cxx b/src/HYDROGUI/HYDROGUI_Operation.cxx index 3183b3b8..d3d15202 100644 --- a/src/HYDROGUI/HYDROGUI_Operation.cxx +++ b/src/HYDROGUI/HYDROGUI_Operation.cxx @@ -94,17 +94,13 @@ void HYDROGUI_Operation::startOperation() void HYDROGUI_Operation::abortOperation() { LightApp_Operation::abortOperation(); - - if( inputPanel() ) - inputPanel()->hide(); + closeInputPanel(); } void HYDROGUI_Operation::commitOperation() { LightApp_Operation::commitOperation(); - - if( inputPanel() ) - inputPanel()->hide(); + closeInputPanel(); } HYDROGUI_InputPanel* HYDROGUI_Operation::createInputPanel() const @@ -112,6 +108,16 @@ HYDROGUI_InputPanel* HYDROGUI_Operation::createInputPanel() const return NULL; } +void HYDROGUI_Operation::closeInputPanel() +{ + if( myPanel ) + { + myModule->getApp()->desktop()->removeDockWidget( myPanel ); + delete myPanel; + myPanel = 0; + } +} + bool HYDROGUI_Operation::processApply( int& theUpdateFlags, QString& theErrorMsg ) { diff --git a/src/HYDROGUI/HYDROGUI_Operation.h b/src/HYDROGUI/HYDROGUI_Operation.h index cd701c41..70b1ccd0 100644 --- a/src/HYDROGUI/HYDROGUI_Operation.h +++ b/src/HYDROGUI/HYDROGUI_Operation.h @@ -52,6 +52,7 @@ protected: virtual void commitOperation(); virtual HYDROGUI_InputPanel* createInputPanel() const; + virtual void closeInputPanel(); virtual bool processApply( int& theUpdateFlags, QString& theErrorMsg ); virtual void processCancel();