mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
DoubleTab Open Submodule
This commit is contained in:
parent
033fbc6383
commit
46b1fc1831
2 changed files with 12 additions and 0 deletions
|
@ -457,6 +457,7 @@
|
||||||
HorizontalScrollBarVisibility="Disabled"
|
HorizontalScrollBarVisibility="Disabled"
|
||||||
VerticalScrollBarVisibility="Auto"
|
VerticalScrollBarVisibility="Auto"
|
||||||
ContextRequested="OnSubmoduleContextRequested"
|
ContextRequested="OnSubmoduleContextRequested"
|
||||||
|
DoubleTapped="OnDoubleTappedSubmodule"
|
||||||
IsVisible="{Binding IsSubmoduleGroupExpanded, Mode=OneWay}">
|
IsVisible="{Binding IsSubmoduleGroupExpanded, Mode=OneWay}">
|
||||||
<DataGrid.Styles>
|
<DataGrid.Styles>
|
||||||
<Style Selector="DataGridRow">
|
<Style Selector="DataGridRow">
|
||||||
|
|
|
@ -332,5 +332,16 @@ namespace SourceGit.Views
|
||||||
outs.Add(b);
|
outs.Add(b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnDoubleTappedSubmodule(object sender, TappedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is DataGrid datagrid && datagrid.SelectedItem != null && DataContext is ViewModels.Repository repo)
|
||||||
|
{
|
||||||
|
var submodule = datagrid.SelectedItem as string;
|
||||||
|
(DataContext as ViewModels.Repository).OpenSubmodule(submodule);
|
||||||
|
}
|
||||||
|
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue