From: nds Date: Mon, 16 Dec 2013 10:21:29 +0000 (+0000) Subject: Fix for the bug #240 - Image prevents selection of other objects X-Git-Tag: BR_hydro_v_0_6~81 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2930e23df45888720001ce2c9f25e9355c3c9b96;p=modules%2Fhydro.git 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. --- 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,