- fixed problem with sword menu which won't open if no custom is created.

This commit is contained in:
Tercio
2013-10-09 12:34:40 -03:00
parent f0f07bb078
commit 05f3f3a343
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
--> global name declaration
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
_detalhes.userversion = "v1.4.15"
_detalhes.userversion = "v1.4.17"
_detalhes.version = "Alpha 007"
_detalhes.realversion = 7
+7 -1
View File
@@ -1457,7 +1457,13 @@ function _detalhes:MontaAtributosOption (instancia, func)
for index, custom in _ipairs (_detalhes.custom) do
CoolTip:AddMenu (2, func, nil, 5, index, custom.name, custom.icon, true)
end
CoolTip:SetLastSelected (2, 5, instancia.m2_last [5]+1)
if (not instancia.m2_last [5]) then
CoolTip:SetLastSelected (2, 5, 1)
else
CoolTip:SetLastSelected (2, 5, instancia.m2_last [5]+1)
end
CoolTip:SetLastSelected (1, atributo_ativo)
return menu_principal, sub_menus