-
-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
Description
Describe the problem
BugSack uses CreateFromMixins. In the Mixins, the SettingsListElementTemplate has had the previewButton and soundDropdown added to it. Then, when other addons use the same SettingsListElementTemplate, the previewButton and soundDropdown will be created within the options of other addons. To solve this issue, u need to hide them in BugSackSoundDropdownInitializer:Resetter. like this:
function BugSackSoundDropdownInitializer:Resetter(frame)
if frame.cbrHandles then
frame.cbrHandles:Unregister()
end
frame.previewButton:Hide()
frame.soundDropdown:Hide()
end
However, if I switch back to the options page of BugSack again, they will not be displayed, Because they were hidden when the page was closed last time, So, you still need to make them display at the end of the BugSackSoundDropdownInitializer:InitFrame method. like this:
function BugSackSoundDropdownInitializer:InitFrame(frame)
...
-- Register callback for external changes
frame.cbrHandles:SetOnValueChangedCallback(soundSetting:GetVariable(), UpdateDropdownText)
-- display hidden widgets
frame.previewButton:Show()
frame.soundDropdown:Show()
end
Reactions are currently unavailable