mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
fix<WorkingCopy>: unselect items before checking conflicts
This commit is contained in:
parent
b5c623a51b
commit
08f279a521
1 changed files with 14 additions and 12 deletions
|
@ -112,25 +112,21 @@ namespace SourceGit.Views.Widgets {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (container.IsUnstaged) {
|
||||||
|
stagedContainer.UnselectAll();
|
||||||
|
} else {
|
||||||
|
unstagedContainer.UnselectAll();
|
||||||
|
}
|
||||||
|
|
||||||
var change = e.Target;
|
var change = e.Target;
|
||||||
if (change.IsConflit) {
|
if (change.IsConflit) {
|
||||||
mergePanel.Visibility = Visibility.Visible;
|
mergePanel.Visibility = Visibility.Visible;
|
||||||
|
diffViewer.Reset();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mergePanel.Visibility = Visibility.Collapsed;
|
mergePanel.Visibility = Visibility.Collapsed;
|
||||||
|
if (container.IsUnstaged) {
|
||||||
if (!container.IsUnstaged) {
|
|
||||||
unstagedContainer.UnselectAll();
|
|
||||||
|
|
||||||
diffViewer.Diff(repo.Path, new DiffViewer.Option() {
|
|
||||||
ExtraArgs = "--cached",
|
|
||||||
Path = change.Path,
|
|
||||||
OrgPath = change.OriginalPath
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
stagedContainer.UnselectAll();
|
|
||||||
|
|
||||||
switch (change.WorkTree) {
|
switch (change.WorkTree) {
|
||||||
case Models.Change.Status.Added:
|
case Models.Change.Status.Added:
|
||||||
case Models.Change.Status.Untracked:
|
case Models.Change.Status.Untracked:
|
||||||
|
@ -147,6 +143,12 @@ namespace SourceGit.Views.Widgets {
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
diffViewer.Diff(repo.Path, new DiffViewer.Option() {
|
||||||
|
ExtraArgs = "--cached",
|
||||||
|
Path = change.Path,
|
||||||
|
OrgPath = change.OriginalPath
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Reference in a new issue