Salome HOME
Check in GLViewer context if an object is selectable before any action V9_12_0a1 V9_12_0a2
authorCHEMIN Sebastien <sc236498@is245491.intra.cea.fr>
Tue, 5 Sep 2023 10:52:07 +0000 (12:52 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Thu, 28 Sep 2023 14:34:40 +0000 (16:34 +0200)
src/GLViewer/GLViewer_Context.cxx

index 205458d97b51726acc5fac6dd198989653dc7a1c..b3e5c4705575436892cb6e00b67668d33c4bee2a 100644 (file)
@@ -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 );