Scrolled selection bugfix

When clicking on the header of a row, select exactly that row, even if the view is scrolled a bit to the right.
This commit is contained in:
Benjamin Popp 2021-05-03 16:24:56 -05:00
parent 7de69da17c
commit d85464a7b3

View File

@ -349,6 +349,7 @@ namespace HavenSoft.HexManiac.WPF.Controls {
if (ViewPort is ViewPort editableViewPort) {
var point = e.GetPosition(this);
if (point.X < 0) {
downPoint = new ModelPoint(0, downPoint.Y);
editableViewPort.SelectionStart = downPoint;
editableViewPort.SelectionEnd = new ModelPoint(editableViewPort.Width - 1, downPoint.Y);
} else if (Keyboard.Modifiers == ModifierKeys.Shift) {