White Box Fix

If a skin has certain defaults still set from instance_defaults then assume it is a corrupted skin
This commit is contained in:
Flamanis
2022-09-10 22:45:01 -05:00
parent 2b2f45e3e5
commit af09a4bb4f
+12 -3
View File
@@ -1500,6 +1500,8 @@ end
--print ("fixing...", instance.meu_id)
--instance:ToolbarMenuButtons()
end
--> ao reiniciar o addon esta funo rodada para recriar a janela da instncia
--> search key: ~restaura ~inicio ~start
@@ -1525,14 +1527,14 @@ function _detalhes:RestauraJanela(index, temp, load_only)
self.rows_created = 0
self.rows_showing = 0
self.rows_max = 50
self.rows_fit_in_window = nil
self.largura_scroll = 26
self.bar_mod = 0
self.bgdisplay_loc = 0
self.last_modo = self.last_modo or modo_grupo
self.cached_bar_width = self.cached_bar_width or 0
self.row_height = self.row_info.height + self.row_info.space.between
self.rows_fit_in_window = _math_floor (self.posicao[self.mostrando].h / self.row_height)
--> create frames
local isLocked = self.isLocked
local _baseframe, _bgframe, _bgframe_display, _scrollframe = gump:CriaJanelaPrincipal (self.meu_id, self)
@@ -1606,7 +1608,14 @@ function _detalhes:RestauraJanela(index, temp, load_only)
else
self.mostrando = "normal"
end
if (self.skin == _detalhes.default_skin_to_use and self.show_statusbar) then
if(self.color[1] == 1 and self.color[2] == 1 and self.color[3] == 1 and self.color[4] == 1) then
print ("|cFFFF2222Details!: Corrupted skin detected! Resetting window skin to default.")
self.skin = "no skin"
self:ChangeSkin(_detalhes.default_skin_to_use)
end
end
--> internal stuff
self.oldwith = self.baseframe:GetWidth()