Skip to content

Commit 7141f82

Browse files
Desktop: Fix bad selection/paint after drag selecting around window
Caught by accident when automating a test case. Yay! Same root cause as the fix in 7668b93 - clearing selection can change what icons are cached. Similar fix. This regressed in 22975d4, so new in 1.6
1 parent 73604a5 commit 7141f82

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/desktop/main.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5351,6 +5351,7 @@ END_PARAM_BLOCK
53515351
jsr ExtendSelectionModifierDown
53525352
bmi :+
53535353
clear: jsr ClearSelection
5354+
CALL CacheWindowIconList, A=window_id
53545355
:
53555356

53565357
;; --------------------------------------------------

tests/desktop/repaints.lua

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ end)
174174
window.
175175
]]
176176
test.Step(
177-
"drag select on desktop doesn't select file icons - after icon click",
177+
"drag select on desktop doesn't select file icons - with file icon selection",
178178
function()
179179
a2d.SelectPath("/A2.DESKTOP/READ.ME")
180180
a2d.MoveWindowBy(40, 30)
@@ -184,8 +184,6 @@ test.Step(
184184
rect[3] + 20, rect[4] + 10)
185185
a2d.InMouseKeysMode(function(m) m.Home() end)
186186

187-
-- BUG: Bad paint inside window!!!
188-
189187
test.Snap("verify no mispaint")
190188
test.ExpectEquals(#a2d.GetSelectedIcons(), 0, "nothing should be selected")
191189
end)

0 commit comments

Comments
 (0)