Skip to content

Commit

Permalink
Different name on button icon is now clickable again
Browse files Browse the repository at this point in the history
  • Loading branch information
hypehuman committed Oct 16, 2014
1 parent 1d417bc commit ad7b66e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion SuperDuperMacro/SuperDuperMacro_Frames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,13 @@ f:SetText("Change Name/Icon")
f:SetWidth(140)
f:SetHeight(22)
f:SetPoint("RIGHT", sdm_usageButton, "LEFT")
f:SetScript("OnClick", function() sdm_changeIconFrame:Show() end)
f:SetScript("OnClick", function()
if MacroPopupFrame ~= nil and MacroPopupFrame:IsShown() then
print(sdm_printPrefix.."The change macro name/icon frame is already open.")
else
sdm_changeIconFrame:Show()
end
end)
sdm_AddToExclusiveGroup(f, "centerwindows", true)

f = CreateFrame("Button", "sdm_saveAsButton", sdm_mainFrame, "UIPanelButtonTemplate")
Expand Down
5 changes: 3 additions & 2 deletions SuperDuperMacro/SuperDuperMacro_Interface.lua
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,8 @@ function sdm_OnShow_changeIconFrame(f)
f.prevpoints[i]={MacroPopupFrame:GetPoint(i)}
end
MacroPopupFrame:ClearAllPoints()
--MacroPopupFrame:SetParent(f)
f.prevParent = MacroPopupFrame:GetParent()
MacroPopupFrame:SetParent(f)
MacroPopupFrame:SetPoint("TOP", f, "BOTTOM", 0,15)
MacroPopupFrame:Show()
_,_,_,_,f.fontstring = MacroPopupFrame:GetRegions()
Expand Down Expand Up @@ -661,7 +662,7 @@ function sdm_OnHide_changeIconFrame(f)
MacroPopupEditBox:SetAutoFocus(true)
MacroPopupFrame.mode=f.prevmode
MacroPopupFrame:ClearAllPoints()
--MacroPopupFrame:SetParent(UIParent)
MacroPopupFrame:SetParent(f.prevParent)
for _,point in ipairs(f.prevpoints) do
MacroPopupFrame:SetPoint(point[1], point[2], point[3], point[4], point[5])
end
Expand Down

0 comments on commit ad7b66e

Please sign in to comment.