X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FGEOMGUI%2FGeometryGUI_Swig.cxx;h=fe9ff55a41e1571797f72d60194647feb95f2af6;hb=76e11e9eb1f6fd4e2d080d8482c1dea2e274b56d;hp=a99523bb3a0196e1953273a2b9580c4019fcf525;hpb=40a7e07f710d683a2a450c1dac93cbfc29638905;p=modules%2Fgeom.git diff --git a/src/GEOMGUI/GeometryGUI_Swig.cxx b/src/GEOMGUI/GeometryGUI_Swig.cxx index a99523bb3..fe9ff55a4 100644 --- a/src/GEOMGUI/GeometryGUI_Swig.cxx +++ b/src/GEOMGUI/GeometryGUI_Swig.cxx @@ -59,8 +59,6 @@ #include "utilities.h" #include "SALOMEDSClient.hxx" -#include "SALOMEDS_SObject.hxx" -#include "SALOMEDS_Study.hxx" // OCCT Includes #include @@ -157,7 +155,6 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry) GEOM::GEOM_Object_var aShape = Geom->GetIORFromString(anIORValue.c_str()); TopoDS_Shape Shape = ShapeReader.GetShape(Geom,aShape); - if (obj) { if (obj->FindAttribute(anAttr, "AttributeName")) { _PTR(AttributeName) aName (anAttr); @@ -170,7 +167,6 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry) aStudyBuilder->Addreference(newObj1, obj); // commit transaction op->commit();*/ - Handle(GEOM_InteractiveObject) anIO = new GEOM_InteractiveObject (const_cast(anIORValue.c_str()), const_cast(aFatherIOR.c_str()), @@ -178,6 +174,7 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry) const_cast( obj->GetID().c_str())); if (SVTK_ViewWindow* svtkViewWindow = GetSVTKViewWindow(app)) { + SVTK_RenderWindowInteractor* aRenderInter= svtkViewWindow->getRWInteractor(); int aMode = aRenderInter->GetDisplayMode(); @@ -191,6 +188,7 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry) aRenderInter->Display(GActor); } aRenderInter->Update(); + cout << 8.2 << endl; } else if (OCCViewer_Viewer* occViewer = GetOCCViewer(app)) { Handle(AIS_InteractiveContext) ic = occViewer->getAISContext(); Handle(GEOM_AISShape) aSh = @@ -201,7 +199,7 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry) ic->AddOrRemoveCurrentObject(aSh,true); } // update object browser - SalomeApp_Application* app = dynamic_cast(app); + SalomeApp_Application* app = NULL; //dynamic_cast(app); if (app) { CAM_Module* module = app->module("Geometry"); SalomeApp_Module* appMod = dynamic_cast(module); @@ -215,6 +213,22 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry) // MESSAGE("createAndDisplayGO"); ProcessVoidEvent(new TEvent (Entry)); + + class TEventUpdateBrowser: public SALOME_Event + { + public: + TEventUpdateBrowser() {} + virtual void Execute() { + SalomeApp_Application* app = dynamic_cast(SUIT_Session::session()->activeApplication()); + if (app) { + CAM_Module* module = app->module("Geometry"); + SalomeApp_Module* appMod = dynamic_cast(module); + if (appMod) appMod->updateObjBrowser(true); + } + } + }; + + ProcessVoidEvent(new TEventUpdateBrowser ()); }