File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2202,15 +2202,18 @@ void Viewport::pointer_select_media(const PointerEvent &pointer_event) {
22022202 // lazy!
22032203 thread_local utility::Uuid last_im_id;
22042204
2205+ const auto pointer_x = pointer_event.x () / state_.devicePixelRatio_ ;
2206+ const auto pointer_y = pointer_event.y () / state_.devicePixelRatio_ ;
2207+
22052208 // lreverse oop through image bounds (last one is drawn on-top)
22062209 // these are the images visible in the layout
22072210 for (int i = (int (image_bounds_in_viewport_pixels_.size ()) - 1 ); i >= 0 ; --i) {
22082211
22092212 const auto &im_bounds = image_bounds_in_viewport_pixels_[i];
22102213
22112214 // is the mouse inside the image boundary?
2212- if (im_bounds.min .x <= pointer_event. x () && im_bounds.max .x >= pointer_event. x () &&
2213- im_bounds.min .y <= pointer_event. y () && im_bounds.max .y >= pointer_event. y () ) {
2215+ if (im_bounds.min .x <= pointer_x && im_bounds.max .x >= pointer_x &&
2216+ im_bounds.min .y <= pointer_y && im_bounds.max .y >= pointer_y ) {
22142217
22152218 // .. yes. send the corresponding media UUID to the playhead
22162219
You can’t perform that action at this time.
0 commit comments