refactor(gui): rækker kan klones ind i et andet layout (redigeringsvindue)
This commit is contained in:
@@ -80,8 +80,11 @@ function SmartPickupFrame:makeRowClickable(row, action)
|
||||
row.mouseEvent = function(element, posX, posY, isDown, isUp, button, eventUsed)
|
||||
local used = baseMouseEvent(element, posX, posY, isDown, isUp, button, eventUsed)
|
||||
-- også inden for listens synlige udsnit: rækker scrollet ud af syne må ikke fange klik
|
||||
if not used and not eventUsed and isUp and button == MOUSE_LEFT and (element.getIsVisible == nil or element:getIsVisible())
|
||||
and isInside(element, posX, posY) and isInside(frame.boxLayout, posX, posY) then
|
||||
-- klik tæller inde i rækkens eget layout (listen eller redigeringsvinduet); listen er død mens vinduet er åbent
|
||||
local layout = element.spuLayout or frame.boxLayout
|
||||
local blockedByPanel = frame.editPanelOpen and layout == frame.boxLayout
|
||||
if not used and not eventUsed and not blockedByPanel and isUp and button == MOUSE_LEFT and (element.getIsVisible == nil or element:getIsVisible())
|
||||
and isInside(element, posX, posY) and isInside(layout, posX, posY) then
|
||||
frame.pendingClick = action
|
||||
return true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user