Skip to content

Commit 5f8ee04

Browse files
Merge pull request livecode#4112 from livecodepanos/bugfix-17790
[Bug 17790] Make sure the mouseAction is updated correctly
2 parents 16a928c + 918be6f commit 5f8ee04

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

extensions/widgets/header/header.lcb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -912,18 +912,24 @@ end handler
912912

913913
public handler OnMouseDown()
914914
-- the icons change color when they are pressed down
915+
-- update the mouseAction
916+
put locToAction(the mouse position) into mMouseAction
915917
if mMouseAction > 0 then
916918
put mMouseAction into mSelectedAction
917919
redraw all
918920
end if
919921
end handler
920922

921923
public handler OnMouseUp()
924+
-- update the mouseAction
925+
put locToAction(the mouse position) into mMouseAction
926+
if mMouseAction is mSelectedAction then
927+
post "mouseUp"
928+
end if
929+
922930
-- the icons change back to their original colors on mouse up
923931
put 0 into mSelectedAction
924932
redraw all
925-
926-
post "mouseUp"
927933
end handler
928934

929935
public handler OnMouseMove()
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# [17790] Make sure the mouseAction is properly updated when clicking on the headerbar widget

0 commit comments

Comments
 (0)