comparison modules/ConfigUI.lua @ 127:29dacbecdb52

Fixed handling for making new bars with the same name
author Flick <flickerstreak@gmail.com>
date Wed, 04 Mar 2009 21:19:32 +0000
parents 711ed6b639ac
children f823f2a5dcb1
comparison
equal deleted inserted replaced
126:6a4b4d3c5fad 127:29dacbecdb52
492 492
493 function editor:CreateBar() 493 function editor:CreateBar()
494 if tmp.barName and tmp.barName ~= "" then 494 if tmp.barName and tmp.barName ~= "" then
495 tmp.creating = true 495 tmp.creating = true
496 local bar = ReAction:CreateBar(tmp.barName, tmp.barType or ReAction:GetDefaultBarType(), tmp.barRows, tmp.barCols, tmp.barSize, tmp.barSpacing) 496 local bar = ReAction:CreateBar(tmp.barName, tmp.barType or ReAction:GetDefaultBarType(), tmp.barRows, tmp.barCols, tmp.barSize, tmp.barSpacing)
497 self:CreateBarTree(bar) 497 if bar then
498 AceConfigDialog:SelectGroup(editorName, barOptMap[tmp.barName]) 498 self:CreateBarTree(bar)
499 tmp.barName = nil 499 AceConfigDialog:SelectGroup(editorName, barOptMap[tmp.barName])
500 tmp.barName = nil
501 end
500 tmp.creating = false 502 tmp.creating = false
501 end 503 end
502 end 504 end
503 505
504 ReAction.RegisterCallback(editor,"OnCreateBar") 506 ReAction.RegisterCallback(editor,"OnCreateBar")