Quantcast

Fixed backdrop when no profiles have been created yet.

Safturento [11-12-11 - 15:54]
Fixed backdrop when no profiles have been created yet.
Filename
stAddonManager.lua
diff --git a/stAddonManager.lua b/stAddonManager.lua
index b4006d9..e70719b 100644
--- a/stAddonManager.lua
+++ b/stAddonManager.lua
@@ -194,6 +194,7 @@ function stAddonManager:LoadProfileWindow()
 			addon.enabled = true
 		end
 	end)
+	self.EnableAll = EnableAll

 	local DisableAll = CreateMenuButton(window, EnableAll:GetWidth(), EnableAll:GetHeight(), L.Disable_All, "TOPRIGHT", window, "BOTTOMRIGHT", -5, -5)
 	DisableAll:SetScript("OnClick", function(self)
@@ -205,6 +206,7 @@ function stAddonManager:LoadProfileWindow()
 			end
 		end
 	end)
+	self.DisableAll = DisableAll

 	local SaveProfile = CreateMenuButton(window, window:GetWidth()-10, 20, L.New_Profile, "TOPLEFT", EnableAll, "BOTTOMLEFT", 0, -5)
 	SaveProfile:SetScript("OnClick", function(self)
@@ -362,7 +364,8 @@ function stAddonManager:LoadProfileWindow()
 			end
 			prevButton = button
 		end
-
+
+		if not prevButton then prevButton = SaveProfile end
 		window.backdrop:ClearAllPoints()
 		window.backdrop:SetPoint("TOPLEFT", window, "TOPLEFT", 0, 0)
 		window.backdrop:SetPoint("TOPRIGHT", window, "TOPRIGHT", 0, 0)