File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Original file line number Diff line number Diff line change @@ -232,8 +232,13 @@ def _event_handler(self, event):
232
232
233
233
# for now we only have line collections so this works
234
234
else :
235
- for i , item in enumerate (self ._graphics ):
236
- if item .world_object is event .pick_info ["world_object" ]:
235
+ # get index of world object that made this event
236
+ for i , item in enumerate (self .graphics ):
237
+ wo = WORLD_OBJECTS [item .loc ]
238
+ # we only store hex id of worldobject, but worldobject `pick_info` is always the real object
239
+ # so if pygfx worldobject triggers an event by itself, such as `click`, etc., this will be
240
+ # the real world object in the pick_info and not the proxy
241
+ if wo is event .pick_info ["world_object" ]:
237
242
indices = i
238
243
target_info .target ._set_feature (feature = target_info .feature , new_data = target_info .new_data , indices = indices )
239
244
else :
You can’t perform that action at this time.
0 commit comments