From 747b895db2e1da07ed8a1aebec60a456cd040d74 Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 8 Apr 2019 21:57:48 +0200 Subject: [PATCH] api: pass init to next movable function --- api/api.lua | 5 +++-- pfUI.toc | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/api.lua b/api/api.lua index 664b280d..e823828f 100644 --- a/api/api.lua +++ b/api/api.lua @@ -525,7 +525,8 @@ end -- [ Load Movable ] -- Loads the positions of a Frame. -- 'frame' [frame] the frame that should be positioned. -function pfUI.api.LoadMovable(frame) +-- 'init' [bool] treats the current position as initial data +function pfUI.api.LoadMovable(frame, init) -- update position data if not frame.posdata or init then frame.posdata = { scale = frame:GetScale(), pos = {} } @@ -584,7 +585,7 @@ function pfUI.api.UpdateMovable(frame, init) pfUI.movables[name] = frame end - LoadMovable(frame) + LoadMovable(frame, init) end -- [ Remove Movable ] diff --git a/pfUI.toc b/pfUI.toc index e3f24f65..0f8cd9e5 100644 --- a/pfUI.toc +++ b/pfUI.toc @@ -2,7 +2,7 @@ ## Title: |cff33ffccpf|cffffffffUI ## Author: Shagu ## Notes: A complete user interface replacement. -## Version: 4.0 +## Version: 4.0.1 ## SavedVariables: pfUI_profiles, pfUI_addon_profiles, pfUI_cache ## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB