Fix ghost item border when dropping non-item objects (#1164)

This commit is contained in:
diath 2021-09-29 21:03:01 +02:00 committed by GitHub
parent 1d614e294c
commit 9eb13494f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,7 @@ function UIItem:onDragLeave(droppedWidget, mousePos)
end end
function UIItem:onDrop(widget, mousePos) function UIItem:onDrop(widget, mousePos)
self:setBorderWidth(0)
if not self:canAcceptDrop(widget, mousePos) then if not self:canAcceptDrop(widget, mousePos) then
return false return false
@ -47,7 +48,6 @@ function UIItem:onDrop(widget, mousePos)
g_game.move(item, toPos, 1) g_game.move(item, toPos, 1)
end end
self:setBorderWidth(0)
return true return true
end end