mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2025-01-11 23:57:21 -08:00
fix: Height
can not be negative (#869)
This commit is contained in:
parent
7f9be03e5c
commit
8b04ab52d6
1 changed files with 4 additions and 1 deletions
|
@ -248,6 +248,9 @@ namespace SourceGit.Views
|
|||
return;
|
||||
|
||||
var leftHeight = LeftSidebarGroups.Bounds.Height - 28.0 * 5 - 4;
|
||||
if (leftHeight <= 0)
|
||||
return;
|
||||
|
||||
var localBranchRows = vm.IsLocalBranchGroupExpanded ? LocalBranchTree.Rows.Count : 0;
|
||||
var remoteBranchRows = vm.IsRemoteGroupExpanded ? RemoteBranchTree.Rows.Count : 0;
|
||||
var desiredBranches = (localBranchRows + remoteBranchRows) * 24.0;
|
||||
|
@ -307,7 +310,7 @@ namespace SourceGit.Views
|
|||
WorktreeList.Height = height;
|
||||
}
|
||||
|
||||
if (desiredBranches > leftHeight)
|
||||
if (leftHeight > 0 && desiredBranches > leftHeight)
|
||||
{
|
||||
var local = localBranchRows * 24.0;
|
||||
var remote = remoteBranchRows * 24.0;
|
||||
|
|
Loading…
Reference in a new issue