mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
feature: double-click on single-selecte change tree or file tree will expand/collapse folder node
This commit is contained in:
parent
cce4e5348c
commit
9d13b17aaf
8 changed files with 70 additions and 12 deletions
|
@ -171,22 +171,27 @@ namespace SourceGit.Models
|
|||
if (!IsSelected(modelIndex))
|
||||
{
|
||||
PointerSelect(sender, row, e);
|
||||
_pressedPoint = s_InvalidPoint;
|
||||
}
|
||||
else
|
||||
{
|
||||
var point = e.GetCurrentPoint(sender);
|
||||
if (point.Properties.IsRightButtonPressed)
|
||||
{
|
||||
_pressedPoint = s_InvalidPoint;
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.KeyModifiers == KeyModifiers.Control)
|
||||
{
|
||||
Deselect(modelIndex);
|
||||
}
|
||||
else if (e.ClickCount == 2)
|
||||
else if (e.ClickCount % 2 == 0)
|
||||
{
|
||||
_rowDoubleTapped?.Invoke(this, e);
|
||||
e.Handled = true;
|
||||
}
|
||||
else
|
||||
else if (sender.RowSelection.Count > 1)
|
||||
{
|
||||
using (BatchUpdate())
|
||||
{
|
||||
|
@ -194,9 +199,9 @@ namespace SourceGit.Models
|
|||
Select(modelIndex);
|
||||
}
|
||||
}
|
||||
|
||||
_pressedPoint = s_InvalidPoint;
|
||||
}
|
||||
|
||||
_pressedPoint = s_InvalidPoint;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue