@@ -266,6 +266,7 @@ function CompareTabClass:InitControls()
266266 local entry = self :GetActiveCompare ()
267267 if entry and entry .treeTab and entry .treeTab .specList [index ] then
268268 entry :SetActiveSpec (index )
269+ self .modFlag = true
269270 -- Restore primary build's window title (SetActiveSpec changes it)
270271 if self .primaryBuild .spec then
271272 self .primaryBuild .spec :SetWindowTitleWithBuildClass ()
@@ -283,6 +284,7 @@ function CompareTabClass:InitControls()
283284 local entry = self :GetActiveCompare ()
284285 if entry and entry .skillsTab and entry .skillsTab .skillSetOrderList [index ] then
285286 entry :SetActiveSkillSet (entry .skillsTab .skillSetOrderList [index ])
287+ self .modFlag = true
286288 end
287289 end )
288290 self .controls .compareSkillSetSelect .enabled = setsEnabled
@@ -293,6 +295,7 @@ function CompareTabClass:InitControls()
293295 local entry = self :GetActiveCompare ()
294296 if entry and entry .itemsTab and entry .itemsTab .itemSetOrderList [index ] then
295297 entry :SetActiveItemSet (entry .itemsTab .itemSetOrderList [index ])
298+ self .modFlag = true
296299 end
297300 end )
298301 self .controls .compareItemSetSelect .enabled = setsEnabled
@@ -306,6 +309,7 @@ function CompareTabClass:InitControls()
306309 if setId then
307310 entry .configTab :SetActiveConfigSet (setId )
308311 entry .buildFlag = true
312+ self .modFlag = true
309313 self .configNeedsRebuild = true
310314 end
311315 end
@@ -338,6 +342,7 @@ function CompareTabClass:InitControls()
338342 if mainSocketGroup then
339343 mainSocketGroup .mainActiveSkill = index
340344 entry .modFlag = true
345+ self .modFlag = true
341346 entry .buildFlag = true
342347 end
343348 end
@@ -355,6 +360,7 @@ function CompareTabClass:InitControls()
355360 if activeSkill and activeSkill .activeEffect then
356361 activeSkill .activeEffect .srcInstance .skillPart = index
357362 entry .modFlag = true
363+ self .modFlag = true
358364 entry .buildFlag = true
359365 end
360366 end
@@ -375,6 +381,7 @@ function CompareTabClass:InitControls()
375381 if activeSkill and activeSkill .activeEffect then
376382 activeSkill .activeEffect .srcInstance .skillStageCount = tonumber (buf )
377383 entry .modFlag = true
384+ self .modFlag = true
378385 entry .buildFlag = true
379386 end
380387 end
@@ -395,6 +402,7 @@ function CompareTabClass:InitControls()
395402 if activeSkill and activeSkill .activeEffect then
396403 activeSkill .activeEffect .srcInstance .skillMineCount = tonumber (buf )
397404 entry .modFlag = true
405+ self .modFlag = true
398406 entry .buildFlag = true
399407 end
400408 end
@@ -419,6 +427,7 @@ function CompareTabClass:InitControls()
419427 activeSkill .activeEffect .srcInstance .skillMinion = selected .minionId
420428 end
421429 entry .modFlag = true
430+ self .modFlag = true
422431 entry .buildFlag = true
423432 end
424433 end
@@ -438,6 +447,7 @@ function CompareTabClass:InitControls()
438447 if activeSkill and activeSkill .activeEffect then
439448 activeSkill .activeEffect .srcInstance .skillMinionSkill = index
440449 entry .modFlag = true
450+ self .modFlag = true
441451 entry .buildFlag = true
442452 end
443453 end
@@ -515,6 +525,7 @@ function CompareTabClass:InitControls()
515525 local entry = self :GetActiveCompare ()
516526 if entry and entry .itemsTab and entry .itemsTab .itemSetOrderList [index ] then
517527 entry :SetActiveItemSet (entry .itemsTab .itemSetOrderList [index ])
528+ self .modFlag = true
518529 end
519530 end )
520531 self .controls .compareItemSetSelect2 .enabled = itemsShown
@@ -541,6 +552,7 @@ function CompareTabClass:InitControls()
541552 local entry = self :GetActiveCompare ()
542553 if entry and entry .treeTab and entry .treeTab .specList [index ] then
543554 entry :SetActiveSpec (index )
555+ self .modFlag = true
544556 if self .primaryBuild .spec then
545557 self .primaryBuild .spec :SetWindowTitleWithBuildClass ()
546558 end
@@ -588,6 +600,7 @@ function CompareTabClass:InitControls()
588600 local entry = self :GetActiveCompare ()
589601 if entry and entry .treeTab and entry .treeTab .specList [index ] then
590602 entry :SetActiveSpec (index )
603+ self .modFlag = true
591604 -- Restore primary build's window title (compare entry's SetActiveSpec changes it)
592605 if self .primaryBuild .spec then
593606 self .primaryBuild .spec :SetWindowTitleWithBuildClass ()
@@ -1029,7 +1042,11 @@ function CompareTabClass:ImportFromCode(code)
10291042 if not xmlText then
10301043 return false
10311044 end
1032- return self :ImportBuild (xmlText , " Imported build" )
1045+ if self :ImportBuild (xmlText , " Imported build" ) then
1046+ self .modFlag = true
1047+ return true
1048+ end
1049+ return false
10331050end
10341051
10351052-- Save comparison builds to the build file
@@ -1105,6 +1122,7 @@ end
11051122function CompareTabClass :RemoveBuild (index )
11061123 if index >= 1 and index <= # self .compareEntries then
11071124 t_remove (self .compareEntries , index )
1125+ self .modFlag = true
11081126 if self .activeCompareIndex > # self .compareEntries then
11091127 self .activeCompareIndex = # self .compareEntries
11101128 end
@@ -1688,6 +1706,7 @@ function CompareTabClass:OpenImportPopup()
16881706 local xmlText = Inflate (common .base64 .decode (codeData :gsub (" -" ," +" ):gsub (" _" ," /" )))
16891707 if xmlText then
16901708 self :ImportBuild (xmlText , customName or (" Imported from " .. site .label ))
1709+ self .modFlag = true
16911710 main :ClosePopup ()
16921711 else
16931712 stateText = colorCodes .NEGATIVE .. " Failed to decode build data"
@@ -1704,6 +1723,7 @@ function CompareTabClass:OpenImportPopup()
17041723 local xmlText = Inflate (common .base64 .decode (buf :gsub (" -" ," +" ):gsub (" _" ," /" )))
17051724 if xmlText then
17061725 self :ImportBuild (xmlText , customName or " Imported build" )
1726+ self .modFlag = true
17071727 main :ClosePopup ()
17081728 else
17091729 stateText = colorCodes .NEGATIVE .. " Invalid build code"
0 commit comments