Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
fix onload errors when loading a fresh profile
Browse files Browse the repository at this point in the history
  • Loading branch information
brittyazel committed Sep 26, 2019
1 parent 77ac611 commit 4a7466a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
6 changes: 3 additions & 3 deletions Neuron.lua
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,6 @@ function Neuron:OnInitialize()
--Initialize the chat commands (i.e. /neuron)
Neuron:RegisterChatCommand("neuron", "slashHandler")

--build all bar and button frames and run initial setup
Neuron:Startup()

end

--- **OnEnable** which gets called during the PLAYER_LOGIN event, when most of the data provided by the game is already present.
Expand Down Expand Up @@ -233,6 +230,9 @@ function Neuron:OnEnable()
Neuron.activeSpec = GetSpecialization()
end

--build all bar and button frames and run initial setup
Neuron:Startup()

--Load all bars and buttons
for i,v in pairs(Neuron.BARIndex) do
v:Load()
Expand Down
2 changes: 0 additions & 2 deletions Objects/ACTIONBUTTON_Flyout.lua
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,6 @@ function ACTIONBUTTON:filter_toy()

end

test = data

return data

end
Expand Down
26 changes: 12 additions & 14 deletions Objects/BUTTON.lua
Original file line number Diff line number Diff line change
Expand Up @@ -530,25 +530,23 @@ end


function BUTTON:SetDefaults(defaults)
if defaults then
for k,v in pairs(defaults) do

if defaults.config then
for k2, v2 in pairs(defaults.config) do
self.config[k2] = v2
end
end
if not defaults then
return
end

if defaults.keys then
for k2, v2 in pairs(defaults.keys) do
self.keys[k2] = v2
end
end
if defaults.config then
for k, v in pairs(defaults.config) do
self.DB.config[k] = v
end
end

if defaults.keys then
for k, v in pairs(defaults.keys) do
self.DB.keys[k] = v
end
end


end
end

function BUTTON:SetType()
Expand Down

0 comments on commit 4a7466a

Please sign in to comment.