Allow window delete to be used while searching

This commit is contained in:
Flamanis 2024-05-05 19:32:52 -05:00
parent d1d6559f5a
commit 1f5ca8a3e4

View file

@ -3005,6 +3005,7 @@ do
{type = "blank"},
{--delete window
id = 'deleteWindow',
type = "select",
get = function() return 0 end,
values = function()
@ -3017,8 +3018,8 @@ do
{--delete window
type = "execute",
func = function(self)
local profileDropdown = sectionFrame.widget_list_by_type.dropdown[3]
local selectedWindow = profileDropdown:GetValue()
local windowDropdown = self.MyObject.container:GetWidgetById('deleteWindow')
local selectedWindow = windowDropdown and windowDropdown:GetValue()
if (selectedWindow) then
Details:DeleteInstance(selectedWindow)