Skip to content

Commit 753ccd5

Browse files
authored
[Bug 22211] Remove unnecessary 'unlock cursor' in ideMouseMove
This patch removes a seemingly unnecessary `unlock cursor` in the IDE's mouseMove event handler (`ideMouseMove`). The IDE intercepts mouseMove so that it can update the resize cursor used when the mouse is over the relevant selection handlers. It does this by locking the cursor in this case and then changing the cursor appropriately; unlocking the cursor when there is a selected object and the mouse is not over a selection handle. Previously it would also unlock the cursor if pointer tool was in effect and there was no selected object which (because the handler is executed in time after any user handlers) would undo any user use of `lock cursor`. This fixes bug 22211 and bug 18428 and avoids the problems of a fix for these in livecode#2092
1 parent 75529a9 commit 753ccd5

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Toolset/libraries/revbackscriptlibrary.livecodescript

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3284,7 +3284,12 @@ constant kHandleSize = 5
32843284
on ideMouseMove pX, pY, pTarget
32853285
if the tool is not "pointer tool" then exit ideMouseMove
32863286

3287-
if pTarget is among the lines of the selectedObjects then
3287+
local tOldCursor
3288+
if the lockcursor then
3289+
put the cursor into tOldCursor
3290+
end if
3291+
3292+
if pTarget is among the lines of the selectedObjects and not (the lockLoc of pTarget) then
32883293
local tRect
32893294
put the rect of pTarget into tRect
32903295
local tLeft = false
@@ -3336,7 +3341,11 @@ on ideMouseMove pX, pY, pTarget
33363341
unlock cursor
33373342
end if
33383343
else
3339-
unlock cursor
3344+
if tOldCursor is not empty and tOldCursor is not among the items of "83,84,31,30" then
3345+
set the cursor to tOldCursor
3346+
else
3347+
unlock cursor
3348+
end if
33403349
end if
33413350
end ideMouseMove
33423351

0 commit comments

Comments
 (0)