1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-05-31 22:41:37 +00:00

Fix multi-select with highlighted target

If you select a line that refers to another line, the target line's
address is highlighted.  If you select multiple lines, the highlight
is removed.  The code that removes the highlight was inadvertently
resetting the selection, making it impossible to shift-click a
range that ended with a highlighted line.
This commit is contained in:
Andy McFadden 2021-09-11 10:48:38 -07:00
parent 55359d423a
commit 74fa310718

View File

@ -1004,12 +1004,8 @@ namespace SourceGen.WpfGui {
private void CodeListView_ReplaceEntry(int index, DisplayList.FormattedParts newParts) {
bool isSelected = CodeDisplayList.SelectedIndices[index];
if (isSelected && codeListView.SelectionMode != SelectionMode.Single) {
if (codeListView.SelectionMode != SelectionMode.Single) {
Debug.WriteLine("HEY: hit unhappy single-select case");
codeListView.SelectedIndex = -1;
} else {
codeListView.SelectedItems.Remove(CodeDisplayList[index]);
}
// Remove entry from selected items list in ListView control.
codeListView.SelectedItems.Remove(CodeDisplayList[index]);
}
CodeDisplayList[index] = newParts;
if (isSelected) {