fix: update visible staged changes retrieval in WorkingCopy (#1187)

* doc: Update translation status and missing keys

* fix: update visible staged changes retrieval in WorkingCopy

* fix: prevent unintended amend behavior when changing current branch

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Gadfly 2025-04-14 22:05:05 +08:00 committed by GitHub
parent 7d20f97f4e
commit 3b1018e0e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 48 additions and 11 deletions

View file

@ -162,7 +162,15 @@ namespace SourceGit.ViewModels
public Models.Branch CurrentBranch
{
get => _currentBranch;
private set => SetProperty(ref _currentBranch, value);
private set
{
var oldHead = _currentBranch?.Head;
if (SetProperty(ref _currentBranch, value))
{
if (oldHead != _currentBranch.Head && _workingCopy is { UseAmend: true })
_workingCopy.UseAmend = false;
}
}
}
public List<BranchTreeNode> LocalBranchTrees