Debugger: Fixed issues with multiselect in virtual lists

This commit is contained in:
Sour 2018-08-19 15:19:28 -04:00
parent f97331e901
commit 80c41f69c2
2 changed files with 7 additions and 1 deletions

View File

@ -128,5 +128,11 @@ namespace Mesen.GUI.Controls
{
this.DoubleBuffered = true;
}
protected override void OnVirtualItemsSelectionRangeChanged(ListViewVirtualItemsSelectionRangeChangedEventArgs e)
{
base.OnVirtualItemsSelectionRangeChanged(e);
base.OnSelectedIndexChanged(e);
}
}
}

View File

@ -195,7 +195,7 @@ namespace Mesen.GUI.Debugger.Controls
int topIndex = lstLabels.TopItem.Index;
int lastSelectedIndex = lstLabels.SelectedIndices[lstLabels.SelectedIndices.Count - 1];
for(int i = lstLabels.SelectedIndices.Count - 1; i >= 0; i--) {
CodeLabel label = (CodeLabel)GetSelectedItem().SubItems[1].Tag;
CodeLabel label = (CodeLabel)_listItems[lstLabels.SelectedIndices[i]].SubItems[1].Tag;
LabelManager.DeleteLabel(label.Address, label.AddressType, i == 0);
}