From: jfa Date: Thu, 15 Nov 2007 15:00:05 +0000 (+0000) Subject: Fix MULTIPR disabling after modules switching. X-Git-Tag: mergeto_BR_Dev_For_4_0_07-Dec-07 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=78a86371465314f6e206f1e17f6474f3b0ce8b2d;p=modules%2Fmultipr.git Fix MULTIPR disabling after modules switching. --- diff --git a/src/MULTIPRGUI/MULTIPR_GUI.cxx b/src/MULTIPRGUI/MULTIPR_GUI.cxx index 8475e1d..466a8da 100644 --- a/src/MULTIPRGUI/MULTIPR_GUI.cxx +++ b/src/MULTIPRGUI/MULTIPR_GUI.cxx @@ -374,6 +374,20 @@ bool MULTIPR_GUI::activateModule(SUIT_Study* theStudy) aStudyDS = _CAST(Study,aStudy)->GetStudy(); aGen->SetCurrentStudy(aStudyDS); + // Init mMULTIPRObj + _PTR(SComponent) aSComp = aStudy->FindComponent(name()); + if (aSComp) { + _PTR(ChildIterator) it (aStudy->NewChildIterator(aSComp)); + if (it->More()) { + _PTR(SObject) aSObj = it->Value(); + string anIOR = aSObj->GetIOR(); + if (!anIOR.empty()) { + CORBA::Object_var anObj = getApp()->orb()->string_to_object(anIOR.c_str()); + mMULTIPRObj = MULTIPR_ORB::MULTIPR_Obj::_narrow(anObj); + } + } + } + return bOk; }