From c5d405c6b68f8e3563cb22cfdcb2c2a5dc57129b Mon Sep 17 00:00:00 2001 From: mzn Date: Wed, 29 Jan 2014 14:16:18 +0000 Subject: [PATCH] Bug #350: multiply creation of obstacles problem. --- src/HYDROGUI/HYDROGUI_GeomObjectDlg.cxx | 3 +++ src/HYDROGUI/HYDROGUI_ImportGeomObjectOp.cxx | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/HYDROGUI/HYDROGUI_GeomObjectDlg.cxx b/src/HYDROGUI/HYDROGUI_GeomObjectDlg.cxx index aec19ada..e69a21b7 100644 --- a/src/HYDROGUI/HYDROGUI_GeomObjectDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_GeomObjectDlg.cxx @@ -135,8 +135,10 @@ HYDROGUI_GeomObjectDlg::~HYDROGUI_GeomObjectDlg() void HYDROGUI_GeomObjectDlg::setObjectNames( const QStringList& theNames ) { + bool isBlocked = myObjects->blockSignals( true ); myObjects->clear(); myObjects->addItems( theNames ); + myObjects->blockSignals( isBlocked ); updateControls(); } @@ -201,6 +203,7 @@ void HYDROGUI_GeomObjectDlg::onBrowse() void HYDROGUI_GeomObjectDlg::reset() { + myDefaultName.clear(); if ( myFileSelectionEnabled ) { myFileName->clear(); } diff --git a/src/HYDROGUI/HYDROGUI_ImportGeomObjectOp.cxx b/src/HYDROGUI/HYDROGUI_ImportGeomObjectOp.cxx index c27ebb93..7832f3b3 100644 --- a/src/HYDROGUI/HYDROGUI_ImportGeomObjectOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportGeomObjectOp.cxx @@ -330,6 +330,9 @@ void HYDROGUI_ImportGeomObjectOp::onExternalOperationFinished( // Update the default name of the HYDRO object updateDefaultName(); + + // Close the dialog corresponding to the external operation + closeExternalOperationDlg(); } void HYDROGUI_ImportGeomObjectOp::closeExternalOperationDlg() -- 2.39.2