1
0
mirror of https://github.com/fadden/6502bench.git synced 2025-07-16 03:24:08 +00:00

Warn about multi-line start/stop tags

One of the most confusing things you can do is select a bunch of
lines and apply a code start tag (nee "code hint").  We now ask for
confirmation when applying start/stop hints to multiple lines.

(issue #89)
This commit is contained in:
Andy McFadden
2020-10-15 17:18:49 -07:00
parent 49f4017410
commit ae4c90d838
4 changed files with 21 additions and 0 deletions

View File

@@ -3379,7 +3379,19 @@ namespace SourceGen {
sel.Add(offset);
}
}
// "first byte only" is used for code start/stop tags, which should only be
// placed at the start of a region.
if (sel.Count > 1) {
MessageBoxResult result = MessageBox.Show(Res.Strings.ANALYZER_TAG_MULTI_CHK,
Res.Strings.CONFIRMATION_NEEDED,
MessageBoxButton.OKCancel, MessageBoxImage.Question);
if (result == MessageBoxResult.Cancel) {
return;
}
}
} else {
// Inline data or none. Select all bytes.
sel = OffsetSetFromSelected();
}