|
|
|
@ -3002,6 +3002,12 @@ namespace Avalonia.Controls |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//TODO: Ensure right button is checked for
|
|
|
|
internal bool UpdateStateOnMouseRightButtonDown(PointerPressedEventArgs pointerPressedEventArgs, int columnIndex, int slot, bool allowEdit) |
|
|
|
{ |
|
|
|
KeyboardHelper.GetMetaKeyState(pointerPressedEventArgs.KeyModifiers, out bool ctrl, out bool shift); |
|
|
|
return UpdateStateOnMouseRightButtonDown(pointerPressedEventArgs, columnIndex, slot, allowEdit, shift, ctrl); |
|
|
|
} |
|
|
|
//TODO: Ensure left button is checked for
|
|
|
|
internal bool UpdateStateOnMouseLeftButtonDown(PointerPressedEventArgs pointerPressedEventArgs, int columnIndex, int slot, bool allowEdit) |
|
|
|
{ |
|
|
|
@ -5674,6 +5680,35 @@ namespace Avalonia.Controls |
|
|
|
VerticalScroll?.Invoke(sender, e); |
|
|
|
} |
|
|
|
|
|
|
|
//TODO: Ensure right button is checked for
|
|
|
|
private bool UpdateStateOnMouseRightButtonDown(PointerPressedEventArgs pointerPressedEventArgs, int columnIndex, int slot, bool allowEdit, bool shift, bool ctrl) |
|
|
|
{ |
|
|
|
Debug.Assert(slot >= 0); |
|
|
|
|
|
|
|
if (shift || ctrl) |
|
|
|
{ |
|
|
|
return true; |
|
|
|
} |
|
|
|
if (IsSlotOutOfBounds(slot)) |
|
|
|
{ |
|
|
|
return true; |
|
|
|
} |
|
|
|
if (GetRowSelection(slot)) |
|
|
|
{ |
|
|
|
return true; |
|
|
|
} |
|
|
|
// Unselect everything except the row that was clicked on
|
|
|
|
try |
|
|
|
{ |
|
|
|
UpdateSelectionAndCurrency(columnIndex, slot, DataGridSelectionAction.SelectCurrent, scrollIntoView: false); |
|
|
|
} |
|
|
|
finally |
|
|
|
{ |
|
|
|
NoSelectionChangeCount--; |
|
|
|
} |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
//TODO: Ensure left button is checked for
|
|
|
|
private bool UpdateStateOnMouseLeftButtonDown(PointerPressedEventArgs pointerPressedEventArgs, int columnIndex, int slot, bool allowEdit, bool shift, bool ctrl) |
|
|
|
{ |
|
|
|
|