From: fps Date: Fri, 15 Nov 2013 13:24:37 +0000 (+0000) Subject: select imported object in browser X-Git-Tag: BR_hydro_v_0_3_1~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=eb028cc84995bbf2f665d936474588ed51d2d893;p=modules%2Fgeom.git select imported object in browser --- 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;