From 4e2afd4cf107783674bcbfba665371301e8e6d53 Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 8 Nov 2016 19:18:47 +0300 Subject: [PATCH] Synchronization of selection from TreeWidget to OCCViewer. --- src/GEOMGUI/GEOMGUI_OCCSelector.cxx | 11 ++++++++++- src/OBJECT/GEOM_Annotation.hxx | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/GEOMGUI/GEOMGUI_OCCSelector.cxx b/src/GEOMGUI/GEOMGUI_OCCSelector.cxx index b79ea3d35..4ab85d38a 100644 --- a/src/GEOMGUI/GEOMGUI_OCCSelector.cxx +++ b/src/GEOMGUI/GEOMGUI_OCCSelector.cxx @@ -24,6 +24,7 @@ // Author : Alexander SOLOVYOV, Open CASCADE S.A.S. (alexander.solovyov@opencascade.com) // #include "GEOMGUI_OCCSelector.h" +#include "GEOM_Annotation.hxx" #include @@ -300,8 +301,16 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) { anOwner = Handle(StdSelect_BRepOwner)::DownCast(owners( i )); - if ( anOwner.IsNull() || !anOwner->HasShape() ) + if ( anOwner.IsNull() || !anOwner->HasShape() ) { + if ( globalSelMap.contains( entryStr ) ) { + Handle(GEOM_Annotation::GEOM_AnnotationOwner) anAnnotationOwner = + Handle(GEOM_Annotation::GEOM_AnnotationOwner)::DownCast(owners( i )); + if ( !anAnnotationOwner.IsNull() ) { + ownersmap.Add( anAnnotationOwner ); + } + } continue; + } // GLOBAL selection if ( !anOwner->ComesFromDecomposition() && globalSelMap.contains( entryStr ) ) diff --git a/src/OBJECT/GEOM_Annotation.hxx b/src/OBJECT/GEOM_Annotation.hxx index 62a8a4dde..0fe6b11f5 100755 --- a/src/OBJECT/GEOM_Annotation.hxx +++ b/src/OBJECT/GEOM_Annotation.hxx @@ -331,7 +331,7 @@ private: friend class OpenGl_Annotation; // allow opengl element to get private data and invoke callback methods -private: +public: //! Custom entity owner implementing correct highlight for topmost mode. class GEOM_AnnotationOwner : public SelectMgr_EntityOwner -- 2.39.2