1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-11 02:28:54 +00:00

Update junk counter

The bottom of the main window shows the total bytes in the project
along with how many are code, data, and junk.  The junk figure wasn't
updating if you changed a data item to junk or vice-versa, because a
simple format change doesn't require reanalyzing the file.

To make the counter "live", we need to tell the updater to refresh the
values whenever a format changes to or from "junk".
This commit is contained in:
Andy McFadden 2021-08-19 14:40:27 -07:00
parent df2154564f
commit f4bee76023

View File

@ -407,6 +407,13 @@ namespace SourceGen {
} else if (oldFormat == null || newFormat == null ||
oldFormat.Length != newFormat.Length) {
uc.ReanalysisRequired = ReanalysisScope.DataOnly;
} else if (oldFormat.FormatType == FormatDescriptor.Type.Junk ||
newFormat.FormatType == FormatDescriptor.Type.Junk) {
// If we're changing to or from "junk", we want to redo the analysis
// to regenerate the code/data/junk summary values at the bottom of the
// screen. (Redoing the full analysis is overkill, but I don't think this
// merits a separate flag.)
uc.ReanalysisRequired = ReanalysisScope.DataOnly;
} else {
uc.ReanalysisRequired = ReanalysisScope.None;
}