From b6200c608643d0b1b12b896804cd73b704bb764c Mon Sep 17 00:00:00 2001 From: Flamanis Date: Wed, 26 Jul 2023 10:39:43 -0500 Subject: [PATCH] Options fix and Cyclical pet ownership fix --- classes/container_actors.lua | 2 +- frames/window_options2.lua | 3 +++ frames/window_options2_sections.lua | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/classes/container_actors.lua b/classes/container_actors.lua index cd05e4ce..7ba02133 100644 --- a/classes/container_actors.lua +++ b/classes/container_actors.lua @@ -722,7 +722,7 @@ end if (container_pets[actorSerial]) then --this is a registered pet local petName, ownerName, ownerGUID, ownerFlag = Details.tabela_pets:PegaDono(actorSerial, actorName, actorFlags) - if (petName and ownerName) then + if (petName and ownerName and ownerGUID ~= actorSerial) then actorName = petName petOwnerObject = self:PegarCombatente(ownerGUID, ownerName, ownerFlag, true) end diff --git a/frames/window_options2.lua b/frames/window_options2.lua index 0aafdc5c..05c09bc5 100644 --- a/frames/window_options2.lua +++ b/frames/window_options2.lua @@ -326,6 +326,9 @@ function Details222.OptionsPanel.InitializeOptionsWindow(instance) end optionsFrame.sectionFramesContainer[sectionId]:Show() + if(optionsFrame.sectionFramesContainer[sectionId].RefreshOptions) then + optionsFrame.sectionFramesContainer[sectionId]:RefreshOptions() + end --hightlight the option button optionsFrame.sectionFramesContainer[sectionId].sectionButton:SetTemplate(options_button_template_selected) optionsFrame.sectionFramesContainer[sectionId].sectionButton:SetIcon({1, 1, 0}, 4, section_menu_button_height -4, "overlay") diff --git a/frames/window_options2_sections.lua b/frames/window_options2_sections.lua index 08bb8bf3..1cf44914 100644 --- a/frames/window_options2_sections.lua +++ b/frames/window_options2_sections.lua @@ -2453,7 +2453,7 @@ do {--title bar icons position X type = "range", - get = function() return currentInstance.menu_anchor[1] end, + get = function() return currentInstance.toolbar_side == 1 and currentInstance.menu_anchor[1] or currentInstance.menu_anchor_down[1] end, set = function(self, fixedparam, value) editInstanceSetting(currentInstance, "MenuAnchor", value) afterUpdate() @@ -2467,7 +2467,7 @@ do {--title bar icons position Y type = "range", - get = function() return currentInstance.menu_anchor[2] end, + get = function() return currentInstance.toolbar_side == 1 and currentInstance.menu_anchor[2] or currentInstance.menu_anchor_down[2] end, set = function(self, fixedparam, value) editInstanceSetting(currentInstance, "MenuAnchor", nil, value) afterUpdate()