Skip to content

Commit e83410e

Browse files
committed
devel/dflayout: fix interface percentage change detection
The interface percentage was not being saved, so it was constantly initiating updates. Once the spurious updates were fixed, it uncovered broken update processing when activating a demo and when the fort toolbar demo was told to update itself.
1 parent 91a06d3 commit e83410e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

devel/dflayout.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ function DemoWindow:init(args)
4747
on_submit = function(index, item)
4848
local demo = self.demos[index]
4949
demo.active = demo.available() and not demo.active
50+
if demo.active then demo.update() end
5051
self:refresh()
5152
end
5253
},
@@ -104,6 +105,7 @@ function DemoScreen:render(...)
104105
if visible_when_not_focused then
105106
local new_if_percentage = df.global.init.display.max_interface_percentage
106107
if new_if_percentage ~= if_percentage then
108+
if_percentage = new_if_percentage
107109
self:updateLayout()
108110
end
109111
end
@@ -203,6 +205,7 @@ local function update_fort_toolbars(secondary)
203205
v.subviews.buttons:setText(
204206
buttons:sub(2) -- the demo panel border is at offset 0, so trim first character to start at offset 1
205207
)
208+
v:updateLayout()
206209
end
207210
if secondary then
208211
-- a secondary toolbar is active, move the primary demonstration up to

0 commit comments

Comments
 (0)