Fix: apply saved window settings after the game loads them

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WyQKCL92ZLwPi9qmYQtNdc
This commit is contained in:
Claude
2026-10-12 15:39:11 -04:00
parent 06ae0d50b9
commit 20d4608c21
2 changed files with 18 additions and 0 deletions
+3
View File
@@ -11,6 +11,9 @@
- The "no DLL: estimates only" note is gone from the panel: without the DLL the timers are now accurate. `/ob debug` still shows whether the DLL is loaded.
- The footer no longer names the route with the oldest data (the restart correction makes it unnecessary). It only appears after a server restart, while a route in the window has not been seen since.
### Fixed
- Window size, look, lock, position and the minimap icon's spot were not restored after logging in: they were applied before the game had loaded the saved settings.
## 1.3.4 (12 October 2026)
### Fixed
+15
View File
@@ -1759,6 +1759,21 @@ local OB_OK, OB_ERR = pcall(function ()
end
end
-- This file runs before the game loads the saved settings, so everything set up above
-- used the defaults. Once they are loaded, apply them: size, look, lock, icon and
-- window position.
do
local f = CreateFrame("Frame")
f:RegisterEvent("VARIABLES_LOADED")
f:SetScript("OnEvent", function()
panel:SetScale(CFG.scale or 1)
ApplyLook()
if CFG.locked then grip:Hide() else grip:Show() end
PlaceButton()
PlacePanel()
end)
end
-- for the settings window (OctoBusOptions.lua)
OctoBus = {
cfg = CFG,