Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 58acf2b

Browse files
Merge pull request #7568 from livecodepanos/bugfix-23220
[[ Bug 23220 ]] Ensure mouseUp is sent to image objects out of browse mode
2 parents fd030b2 + 81162cc commit 58acf2b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/notes/bugfix-23220.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Ensure clicking in an image rect in pointer mode does not send mouseRelease instead of a mouseUp message

engine/src/image.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,11 +465,11 @@ Boolean MCImage::mup(uint2 which, bool p_release)
465465
static_cast<MCMutableImageRep *>(m_rep) -> image_mup(which))
466466
return True;
467467

468+
MCRectangle srect;
469+
MCU_set_rect(srect, mx, my, 1, 1);
468470
switch(getstack() -> gettool(this))
469471
{
470472
case T_BROWSE:
471-
MCRectangle srect;
472-
MCU_set_rect(srect, mx, my, 1, 1);
473473
if (!p_release && maskrect(srect))
474474
message_with_args(MCM_mouse_up, which);
475475
else

0 commit comments

Comments
 (0)