From 9814d3a41ad9334fd47d0410d3cc88a24ea18164 Mon Sep 17 00:00:00 2001 From: ouv Date: Mon, 16 Sep 2013 14:08:22 +0000 Subject: [PATCH] =?utf8?q?Bug=2020:=20View=20=C2=96=20Windows:=20name=20of?= =?utf8?q?=20windows=20are=20wrong.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/HYDROGUI/HYDROGUI_Operation.cxx | 18 ++++++++++++------ src/HYDROGUI/HYDROGUI_Operation.h | 1 + 2 files changed, 13 insertions(+), 6 deletions(-) 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(); -- 2.39.2