From: CHEMIN Sebastien Date: Tue, 5 Sep 2023 10:52:07 +0000 (+0200) Subject: Check in GLViewer context if an object is selectable before any action X-Git-Tag: V9_12_0a1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7ded7a0ef19e6cb531e08abf3a1af46716619a53;p=modules%2Fgui.git Check in GLViewer context if an object is selectable before any action --- diff --git a/src/GLViewer/GLViewer_Context.cxx b/src/GLViewer/GLViewer_Context.cxx index 205458d97..b3e5c4705 100644 --- a/src/GLViewer/GLViewer_Context.cxx +++ b/src/GLViewer/GLViewer_Context.cxx @@ -108,7 +108,8 @@ int GLViewer_Context::MoveTo( int xi, int yi, bool byCircle ) GLViewer_Object* object = *it; GLViewer_Rect* rect = object->getUpdateRect(); - if( rect->contains( GLViewer_Pnt( x, y ) ) ) + if( object->isSelectable() && + rect->contains( GLViewer_Pnt( x, y ) ) ) { onObject = GL_TRUE; object->highlight( x, y, myTolerance, GL_FALSE );