From 96d75c4ad40da9abb07c6b29fd086137718fe699 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 14 Nov 2023 22:08:23 +0000 Subject: [PATCH] 1.15.0 (52186) --- Interface/FrameXML/StaticPopup.lua | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Interface/FrameXML/StaticPopup.lua b/Interface/FrameXML/StaticPopup.lua index b4e32bec97..036ae42eff 100644 --- a/Interface/FrameXML/StaticPopup.lua +++ b/Interface/FrameXML/StaticPopup.lua @@ -5197,19 +5197,21 @@ function StaticPopup_Show(which, text_arg1, text_arg2, data, insertedFrame) end end - if info.verticalButtonLayout then - buttons[1]:SetPoint("TOP", dialog.text, "BOTTOM", 0, -16); - for index = 2, #buttons do - buttons[index]:SetPoint("TOP", buttons[index-1], "BOTTOM", 0, -6); + if #buttons > 0 then + if info.verticalButtonLayout then + buttons[1]:SetPoint("TOP", dialog.text, "BOTTOM", 0, -16); + for index = 2, #buttons do + buttons[index]:SetPoint("TOP", buttons[index-1], "BOTTOM", 0, -6); end - else - local offset = totalWidth / 2; - buttons[1]:SetPoint("BOTTOMLEFT", dialog, "BOTTOM", -offset, bottomSpace); - for index = 2, #buttons do - buttons[index]:SetPoint("BOTTOMLEFT", buttons[index-1], "BOTTOMRIGHT", buttonPadding, 0); + else + local offset = totalWidth / 2; + buttons[1]:SetPoint("BOTTOMLEFT", dialog, "BOTTOM", -offset, bottomSpace); + for index = 2, #buttons do + buttons[index]:SetPoint("BOTTOMLEFT", buttons[index-1], "BOTTOMRIGHT", buttonPadding, 0); end + end end - + if info.extraButton then local extraButton = dialog.extraButton; extraButton:Show();