@@ -76,6 +76,39 @@ editframe.panels = {}
76
76
77
77
GSE .GUIEditFrame = editframe
78
78
79
+ local function GUIUpdateSequenceDefinition (classid , SequenceName , sequence )
80
+ sequence .LastUpdated = GSE .GetTimestamp ()
81
+
82
+ if not GSE .isEmpty (SequenceName ) then
83
+ if GSE .isEmpty (classid ) then
84
+ classid = GSE .GetCurrentClassID ()
85
+ end
86
+ sequence .MetaData .Name = SequenceName
87
+ if not GSE .isEmpty (SequenceName ) then
88
+ local vals = {}
89
+ vals .action = " Replace"
90
+ vals .sequencename = SequenceName
91
+ vals .sequence = sequence
92
+ vals .classid = classid
93
+ if editframe .NewSequence then
94
+ if GSE .ObjectExists (SequenceName ) then
95
+ editframe :SetStatusText (
96
+ string.format (L [" Sequence Name %s is in Use. Please choose a different name." ], SequenceName )
97
+ )
98
+ editframe .nameeditbox :SetText (
99
+ GSEOptions .UNKNOWN .. editframe .nameeditbox :GetText () .. Statics .StringReset
100
+ )
101
+ editframe .nameeditbox :SetFocus ()
102
+ return
103
+ end
104
+ editframe .NewSequence = false
105
+ end
106
+ table.insert (GSE .OOCQueue , vals )
107
+ editframe :SetStatusText (L [" Save pending for " ] .. SequenceName )
108
+ end
109
+ end
110
+ end
111
+
79
112
local basecontainer = AceGUI :Create (" SimpleGroup" )
80
113
basecontainer :SetLayout (" Flow" )
81
114
basecontainer :SetAutoAdjustHeight (false )
@@ -527,15 +560,15 @@ function GSE.GUIEditorPerformLayout()
527
560
" OnClick" ,
528
561
function ()
529
562
if GSE .isEmpty (editframe .invalidPause ) then
530
- GSE . GUIEditFrame :SetStatusText (L [" Save pending for " ] .. nameeditbox :GetText ())
563
+ editframe :SetStatusText (L [" Save pending for " ] .. nameeditbox :GetText ())
531
564
local _ , _ , _ , tocversion = GetBuildInfo ()
532
565
editframe .Sequence .MetaData .ManualIntervention = true
533
566
editframe .Sequence .MetaData .GSEVersion = GSE .VersionNumber
534
567
editframe .Sequence .MetaData .EnforceCompatability = true
535
568
editframe .Sequence .MetaData .TOC = tocversion
536
569
nameeditbox :SetText (nameeditbox :GetText ())
537
570
editframe .SequenceName = GSE .UnEscapeString (nameeditbox :GetText ())
538
- GSE . GUIUpdateSequenceDefinition (editframe .ClassID , editframe .SequenceName , editframe .Sequence )
571
+ GUIUpdateSequenceDefinition (editframe .ClassID , editframe .SequenceName , editframe .Sequence )
539
572
editframe .save = true
540
573
else
541
574
GSE .Print (L [" Error processing Custom Pause Value. You will need to recheck your macros." ], " ERROR" )
@@ -585,7 +618,7 @@ function GSE.GUIEditorPerformLayout()
585
618
editButtonGroup :AddChild (transbutton )
586
619
editButtonGroup :AddChild (editOptionsbutton )
587
620
rightContainer :AddChild (editButtonGroup )
588
- GSE . GUIEditFrame :SetStatusText (editframe .statusText )
621
+ editframe :SetStatusText (editframe .statusText )
589
622
end
590
623
591
624
function GSE .GetVersionList ()
@@ -1207,7 +1240,7 @@ end
1207
1240
1208
1241
local function ChooseVersionTab (version , scrollpos )
1209
1242
GSE .GUIEditorPerformLayout ()
1210
- GSE . GUIEditFrame .ContentContainer :SelectTab (tostring (version ))
1243
+ editframe .ContentContainer :SelectTab (tostring (version ))
1211
1244
if not GSE .isEmpty (editframe .scrollContainer ) and scrollpos > 0 then
1212
1245
editframe .scrollContainer :SetScroll (scrollpos )
1213
1246
end
@@ -2420,7 +2453,7 @@ local function drawAction(container, action, version, keyPath)
2420
2453
returnAction [" MS" ] = tonumber (text )
2421
2454
end
2422
2455
editframe .Sequence .Macros [version ].Actions [keyPath ] = returnAction
2423
- GSE . GUIEditFrame :SetStatusText (editframe .statusText )
2456
+ editframe :SetStatusText (editframe .statusText )
2424
2457
end
2425
2458
)
2426
2459
@@ -3203,7 +3236,7 @@ function GSE.GUISelectEditorTab(container, event, group)
3203
3236
container :ReleaseChildren ()
3204
3237
editframe .SelectedTab = group
3205
3238
3206
- editframe .nameeditbox :SetText (GSE . GUIEditFrame .SequenceName )
3239
+ editframe .nameeditbox :SetText (editframe .SequenceName )
3207
3240
if group == " config" then
3208
3241
GSE :GUIDrawMetadataEditor (container )
3209
3242
elseif group == " new" then
@@ -3336,12 +3369,12 @@ function GSE.GUIDeleteVersion(version)
3336
3369
table.remove (sequence .Macros , version )
3337
3370
printtext = printtext .. " " .. L [" This change will not come into effect until you save this macro." ]
3338
3371
GSE .GUIEditorPerformLayout ()
3339
- GSE . GUIEditFrame .ContentContainer :SelectTab (" config" )
3340
- GSE . GUIEditFrame :SetStatusText (string.format (printtext , version ))
3372
+ editframe .ContentContainer :SelectTab (" config" )
3373
+ editframe :SetStatusText (string.format (printtext , version ))
3341
3374
C_Timer .After (
3342
3375
5 ,
3343
3376
function ()
3344
- GSE . GUIEditFrame :SetStatusText (editframe .statusText )
3377
+ editframe :SetStatusText (editframe .statusText )
3345
3378
end
3346
3379
)
3347
3380
end
0 commit comments