From 0b571850d56a6d2a860f016c93f5cddcb72ab889 Mon Sep 17 00:00:00 2001 From: CHEMIN Sebastien Date: Tue, 5 Sep 2023 12:52:07 +0200 Subject: [PATCH] Check in GLViewer context if an object is selectable before any action --- src/GLViewer/GLViewer_Context.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ); -- 2.39.2