mirror of
https://github.com/fadden/6502bench.git
synced 2025-01-05 23:30:20 +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:
parent
df2154564f
commit
f4bee76023
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user