From: nds Date: Mon, 14 Dec 2015 06:29:29 +0000 (+0300) Subject: #1111 Sketch invisible X-Git-Tag: V_2.1.0~193 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cdaca32d1615752053e09dec9d1d969941ebe425;p=modules%2Fshaper.git #1111 Sketch invisible --- diff --git a/src/NewGeom/NewGeom_Module.cpp b/src/NewGeom/NewGeom_Module.cpp index 7bc410a0b..dbf3bf669 100644 --- a/src/NewGeom/NewGeom_Module.cpp +++ b/src/NewGeom/NewGeom_Module.cpp @@ -120,6 +120,19 @@ void NewGeom_Module::initialize(CAM_Application* theApp) LightApp_Module::initialize(theApp); inspectSalomeModules(); + // if there are created viewer managers, we should try to create viewer + // selector and initialize viewer with it. It sets interactive contect to the + // proxy viewer. If study is opened, startApplication causes the objects visualization, + // AIS context should be initialized in the viewer before this. + if (!mySelector) { + ViewManagerList OCCViewManagers; + application()->viewManagers(OCCViewer_Viewer::Type(), OCCViewManagers); + if (OCCViewManagers.size() > 0) { + // the viewer is restored by "store_visual_state" + mySelector = createSelector(OCCViewManagers.first()); + } + } + myWorkshop->startApplication(); LightApp_Application* anApp = dynamic_cast(theApp); if (anApp)