Fix MinimapCluster movable state restore
This commit is contained in:
@@ -339,18 +339,20 @@ module.enable = function(self)
|
|||||||
SavePosition(target, moveFrame)
|
SavePosition(target, moveFrame)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not target.cursorDrag and state.movable ~= nil then
|
-- Restore UserPlaced while the frame is still temporarily movable.
|
||||||
moveFrame:SetMovable(state.movable)
|
-- Some Vanilla/Turtle frames (notably MinimapCluster) reject
|
||||||
end
|
-- SetUserPlaced() after SetMovable(false), which caused repeated
|
||||||
|
-- "not movable or resizable" errors when releasing Ctrl+Shift.
|
||||||
-- A dragged frame remains user-placed. An untouched frame is restored
|
|
||||||
-- exactly to the state it had before Ctrl+Shift was pressed.
|
|
||||||
if not target.cursorDrag
|
if not target.cursorDrag
|
||||||
and not state.dragged
|
and not state.dragged
|
||||||
and state.userPlaced ~= nil
|
and state.userPlaced ~= nil
|
||||||
and moveFrame.SetUserPlaced then
|
and moveFrame.SetUserPlaced then
|
||||||
moveFrame:SetUserPlaced(state.userPlaced)
|
moveFrame:SetUserPlaced(state.userPlaced)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not target.cursorDrag and state.movable ~= nil then
|
||||||
|
moveFrame:SetMovable(state.movable)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if handle then
|
if handle then
|
||||||
|
|||||||
Reference in New Issue
Block a user