From 9a63dc12e0ae4f328f1e60093c8d8efafe43b9cd Mon Sep 17 00:00:00 2001 From: Flamanis Date: Fri, 1 Apr 2022 15:27:55 -0500 Subject: [PATCH 1/2] Change safe_load to allow varargs for LoadProfile --- functions/profiles.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/profiles.lua b/functions/profiles.lua index 52f55c2b..cf6af5b2 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -203,8 +203,8 @@ function _detalhes:CreatePanicWarning() _detalhes.instance_load_failed:SetPoint ("topright", UIParent, "topright", 0, -250) end -local safe_load = function (func, param1, param2) - local okey, errortext = pcall (func, param1, param2) +local safe_load = function (func, param1, ...) + local okey, errortext = pcall (func, param1, ...) if (not okey) then if (not _detalhes.instance_load_failed) then _detalhes:CreatePanicWarning() @@ -359,7 +359,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy) --> load data saved for this character only instance:LoadLocalInstanceConfig() if (skin.__was_opened) then - if (not safe_load (_detalhes.AtivarInstancia, instance)) then + if (not safe_load (_detalhes.AtivarInstancia, instance, nil, true)) then return end else From 0a7b62701b603934a5697b951cfaa36a84655a8c Mon Sep 17 00:00:00 2001 From: Flamanis Date: Fri, 1 Apr 2022 15:29:00 -0500 Subject: [PATCH 2/2] move_janela now actualizes both windows points --- frames/window_main.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/frames/window_main.lua b/frames/window_main.lua index 8a4103dd..b9d86a63 100644 --- a/frames/window_main.lua +++ b/frames/window_main.lua @@ -865,6 +865,7 @@ local function move_janela (baseframe, iniciando, instancia, just_updating) if (instancia_alvo and not instancia.do_not_snap and not instancia_alvo.do_not_snap) then instancia:AtualizaPontos() + instancia_alvo:AtualizaPontos() local esquerda, baixo, direita, cima local meu_id = instancia.meu_id --> id da inst�ncia que esta sendo movida