enderneko / Cell

A World of Warcraft raid frame addon.
Other
92 stars 23 forks source link

[Bug] Deleting an indicator allows the user to create an invalid indicator #133

Closed tomratford closed 3 months ago

tomratford commented 3 months ago

It seems that sometimes after deleting a indicator, when you go to create a new indicator you are able to create the indicator without a name. This then breaks the entirety of the indicator panel and required me to manually change the lua table with /script to remove the broken entries.

To reproduce:


Screenshot of 'create new indicator' panel with blank name but highlighted 'yes' button

![Screenshot 2024-06-15 at 15 03 29](https://github.com/enderneko/Cell/assets/42618982/eabaab45-2fe2-44c4-b9a3-400710d9ed69)


Bugsack output for broken indicator panel

8x Cell/Modules/Indicators.lua:1983: attempt to index a nil value
[string "@Cell/Modules/Indicators.lua"]:1983: in function 
[string "@Cell/Modules/Indicators.lua"]:1410: in function 
[string "@Cell/Widgets/Widgets.lua"]:1801: in function 

Locals:
last = Button {
 BottomLeftCorner = Texture {
 }
 fs = FontString {
 }
 color =  {
 }
 OnBackdropLoaded =  defined @Blizzard_SharedXML/Backdrop.lua:152
 GetBackdropColor =  defined @Blizzard_SharedXML/Backdrop.lua:390
 ShowTooltip =  defined @Cell/Modules/Indicators.lua:2000
 TopLeftCorner = Texture {
 }
 RightEdge = Texture {
 }
 ApplyBackdrop =  defined @Blizzard_SharedXML/Backdrop.lua:294
 SetBackdrop =  defined @Blizzard_SharedXML/Backdrop.lua:329
 ClearBackdrop =  defined @Blizzard_SharedXML/Backdrop.lua:282
 GetBackdropBorderColor =  defined @Blizzard_SharedXML/Backdrop.lua:409
 GetBackdrop =  defined @Blizzard_SharedXML/Backdrop.lua:347
 height = 20
 hoverColor = 
{ } SetBorderBlendMode = defined @Blizzard_SharedXML/Backdrop.lua:266 HideTooltip = defined @Cell/Modules/Indicators.lua:2009 id = 31 backdropInfo =
{ } OnBackdropSizeChanged = defined @Blizzard_SharedXML/Backdrop.lua:182 TopRightCorner = Texture { } typeIcon = Texture { } tooltips =
{ } 0 = UpdatePixelPerfect = defined @Cell/Widgets/Widgets.lua:674 GetEdgeSize = defined @Blizzard_SharedXML/Backdrop.lua:188 _tooltipsInited = true SetTexture = defined @Cell/Widgets/Widgets.lua:632 TopEdge = Texture { } Center = Texture { } BottomRightCorner = Texture { } width = 20 HasBackdropInfo = defined @Blizzard_SharedXML/Backdrop.lua:278 BottomEdge = Texture { } SetTextColor = defined @Cell/Widgets/Widgets.lua:568 SetupTextureCoordinates = defined @Blizzard_SharedXML/Backdrop.lua:214 SetupPieceVisuals = defined @Blizzard_SharedXML/Backdrop.lua:246 SetBackdropColor = defined @Blizzard_SharedXML/Backdrop.lua:399 LeftEdge = Texture { } SetBackdropBorderColor = defined @Blizzard_SharedXML/Backdrop.lua:422 } (for generator) = defined =[C]:-1 (for state) =
{ 1 =
{ } 2 =
{ } 3 =
{ } 4 =
{ } 5 =
{ } 6 =
{ } 7 =
{ } 8 =
{ } 9 =
{ } 10 =
{ } 11 =
{ } 12 =
{ } 13 =
{ } 14 =
{ } 15 =
{ } 16 =
{ } 17 =
{ } 18 =
{ } 19 =
{ } 20 =
{ } 21 =
{ } 22 =
{ } 23 =
{ } 24 =
{ } 25 =
{ } 26 =
{ } 27 =
{ } 28 =
{ } 29 =
{ } 30 =
{ } 31 =
{ } 32 =
{ } } (for control) = 32 i = 32 t =
{ showDuration = false auras =
{ } showAnimation = true showStack = true spacing =
{ } indicatorName = "indicator3" size =
{ } enabled = true type = "icons" frameLevel = 5 auraType = "buff" castBy = "me" font =
{ } name = "" position =
{ } orientation = "right-to-left" trackByName = false numPerLine = 5 num = 5 } b = Button { BottomLeftCorner = Texture { } color =
{ } OnBackdropLoaded = defined @Blizzard_SharedXML/Backdrop.lua:152 GetBackdropColor = defined @Blizzard_SharedXML/Backdrop.lua:390 SetBackdropBorderColor = defined @Blizzard_SharedXML/Backdrop.lua:422 RightEdge = Texture { } ApplyBackdrop = defined @Blizzard_SharedXML/Backdrop.lua:294 SetBackdrop = defined @Blizzard_SharedXML/Backdrop.lua:329 ClearBackdrop = defined @Blizzard_SharedXML/Backdrop.lua:282 GetBackdropBorderColor = defined @
enderneko commented 3 months ago

Fixed, thanks!