From 22b83e722c111b7dd0e22d576cd97bb1d0c5b58c Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Thu, 1 Sep 2022 11:17:32 -0300 Subject: [PATCH] Reset Auto Hide automation settings after importing a profile --- frames/window_options2_sections.lua | 2 +- functions/profiles.lua | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/frames/window_options2_sections.lua b/frames/window_options2_sections.lua index 21a66cab..d44c33c3 100644 --- a/frames/window_options2_sections.lua +++ b/frames/window_options2_sections.lua @@ -5170,7 +5170,7 @@ do local sectionOptions = { - {type = "label", get = function() return "Switch by Role Out of Combat" end, text_template = subSectionTitleTextTemplate}, + {type = "label", get = function() return "Switch by Role Out of Combat" end, text_template = subSectionTitleTextTemplate}, --localize-me {--DAMAGER role out of combat type = "select", diff --git a/functions/profiles.lua b/functions/profiles.lua index 02b14c69..b21605fd 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -1777,7 +1777,13 @@ function Details:ImportProfile (profileString, newProfileName) profileObject.instances = DetailsFramework.table.copy ({}, profileData.instances) Details:ApplyProfile (newProfileName) - + + --reset automation settings (due to user not knowing why some windows are disappearing) + for instanceId, instance in Details:ListInstances() do + DetailsFramework.table.copy(instance.hide_on_context, Details.instance_defaults.hide_on_context) + end + + Details:Msg ("profile successfully imported.")--localize-me return true else