From 2930e23df45888720001ce2c9f25e9355c3c9b96 Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 16 Dec 2013 10:21:29 +0000 Subject: [PATCH] Fix for the bug #240 - Image prevents selection of other objects It deactivates the image presentation in the OCC viewer. It is not possible to select it in the viewer. --- src/HYDROGUI/HYDROGUI_Shape.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/HYDROGUI/HYDROGUI_Shape.cxx b/src/HYDROGUI/HYDROGUI_Shape.cxx index 3e73e575..8ff001e2 100644 --- a/src/HYDROGUI/HYDROGUI_Shape.cxx +++ b/src/HYDROGUI/HYDROGUI_Shape.cxx @@ -116,6 +116,7 @@ void HYDROGUI_Shape::update( const bool theIsUpdateViewer ) if ( myContext.IsNull() ) return; + bool isDeactivateSelection = false; // Try to retrieve information from object if ( !myObject.IsNull() ) { @@ -295,6 +296,7 @@ void HYDROGUI_Shape::update( const bool theIsUpdateViewer ) setTextureFileName( aTextureFileName, false, false ); setFace( aWire, false, false ); + isDeactivateSelection = true; } else if ( myObject->IsKind( STANDARD_TYPE(HYDROData_Profile) ) ) { @@ -354,6 +356,8 @@ void HYDROGUI_Shape::update( const bool theIsUpdateViewer ) return; myContext->Display( myShape, theIsUpdateViewer ); + if (isDeactivateSelection) + myContext->Deactivate(myShape); } void HYDROGUI_Shape::setVisible( const bool theState, -- 2.39.2