From eb028cc84995bbf2f665d936474588ed51d2d893 Mon Sep 17 00:00:00 2001 From: fps Date: Fri, 15 Nov 2013 13:24:37 +0000 Subject: [PATCH] select imported object in browser --- .../ImportExportGUI_ImportXAODlg.cxx | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx b/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx index 186f4f357..c4681af62 100644 --- a/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx +++ b/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx @@ -136,24 +136,16 @@ void ImportExportGUI_ImportXAODlg::Init() //================================================================================= void ImportExportGUI_ImportXAODlg::ClickOnOk() { + setIsApplyAndClose(true); if (ClickOnApply()) ClickOnCancel(); + setIsApplyAndClose(false); } //================================================================================= // function : ClickOnApply() // purpose : //================================================================================= -/*bool ImportExportGUI_ImportXAODlg::ClickOnApply() -{ - if (!onAccept()) - return false; - - initName(); - - return true; -}*/ - bool ImportExportGUI_ImportXAODlg::ClickOnApply() { if(!isApplyAndClose()) { @@ -275,7 +267,8 @@ bool ImportExportGUI_ImportXAODlg::execute() if (m_mainShape != NULL) { - addInStudy(m_mainShape, m_mainShape->GetName()); + QStringList anEntryList; + anEntryList << addInStudy(m_mainShape, m_mainShape->GetName()); for (int i = 0; i < subShapes->length(); i++) { @@ -291,6 +284,10 @@ bool ImportExportGUI_ImportXAODlg::execute() } updateObjBrowser(); + if( SUIT_Application* anApp = SUIT_Session::session()->activeApplication() ) { + LightApp_Application* aLightApp = dynamic_cast( anApp ); + aLightApp->browseObjects( anEntryList ); + } } return res; -- 2.39.2