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-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6c38b3986542ffa52279f816cb698ef8dafb903b;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 );