Merge pull request #64676 from KoBeWi/split_and_conquer

This commit is contained in:
Rémi Verschelde 2022-08-23 10:28:09 +02:00 committed by GitHub
commit 11506eb24d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -98,11 +98,10 @@ void SplitContainer::_resort() {
// Compute the final middle separation
middle_sep = no_offset_middle_sep;
if (!collapsed) {
int clamped_split_offset = CLAMP(split_offset, ms_first[axis] - no_offset_middle_sep, (get_size()[axis] - ms_second[axis] - sep) - no_offset_middle_sep);
middle_sep += clamped_split_offset;
int clamped_split_offset = CLAMP(split_offset, ms_first[axis] - no_offset_middle_sep, get_size()[axis] - ms_second[axis] - sep);
middle_sep = MAX(middle_sep, clamped_split_offset);
if (should_clamp_split_offset) {
split_offset = clamped_split_offset;
should_clamp_split_offset = false;
}
}