mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 20:54:59 +00:00
feature: add a button in file histories view to reset selected file to selected commit
This commit is contained in:
parent
db8de81120
commit
9a68d70b29
3 changed files with 39 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
|
||||
namespace SourceGit.Views
|
||||
{
|
||||
|
@ -38,5 +39,22 @@ namespace SourceGit.Views
|
|||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnResetToSelectedRevision(object _, RoutedEventArgs e)
|
||||
{
|
||||
if (DataContext is ViewModels.FileHistories vm)
|
||||
{
|
||||
vm.ResetToSelectedRevision();
|
||||
NotifyDonePanel.IsVisible = true;
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnCloseNotifyPanel(object _, PointerPressedEventArgs e)
|
||||
{
|
||||
NotifyDonePanel.IsVisible = false;
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue