From: nds Date: Thu, 29 Dec 2016 16:43:00 +0000 (+0300) Subject: #1958 Fatal error in GEOM module after Export to GEOM X-Git-Tag: V_2.7.0~351^2~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e5854b0139b4c56b7674d454f87144c88571bc2a;p=modules%2Fshaper.git #1958 Fatal error in GEOM module after Export to GEOM AIS_Trihedron problem: Axis and Point should be manually hidden when GEOM is activated. --- diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index a891e6f35..8a1379687 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -86,6 +86,10 @@ #include +#include +#include +#include + #include #include #include @@ -329,6 +333,23 @@ void XGUI_Workshop::deactivateModule() XGUI_Displayer* aDisplayer = displayer(); QObjectPtrList aDisplayed = aDisplayer->displayedObjects(); aDisplayer->deactivateObjects(aDisplayed, true); + Handle(AIS_InteractiveContext) aContext = viewer()->AISContext(); + Handle(AIS_Trihedron) aTrihedron = Handle(AIS_Trihedron)::DownCast(aDisplayer->getTrihedron()); + /// deactivate trihedron in selection modes + TColStd_ListOfInteger aTColModes; + aContext->ActivatedModes(aTrihedron, aTColModes); + TColStd_ListIteratorOfListOfInteger itr( aTColModes ); + for (; itr.More(); itr.Next() ) { + Standard_Integer aMode = itr.Value(); + aContext->Deactivate(aTrihedron, aMode); + } + /// Trihedron problem: objects stayed in the viewer, should be removed manually + /// otherwise in SALOME happens crash by HideAll in the viewer + aContext->Remove(aTrihedron->Position(), true); + aContext->Remove(aTrihedron->Axis(), true); + aContext->Remove(aTrihedron->XAxis(), true); + aContext->Remove(aTrihedron->YAxis(), true); + myOperationMgr->deactivate(); }