1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-04-07 03:58:38 -04:00

Avoid divide by zero when no fixed windows

This commit is contained in:
Jon Beniston 2022-12-20 23:17:31 +00:00
parent f2fe6ea940
commit dea4c1f285

View File

@ -501,7 +501,7 @@ void Workspace::stackVerticalSubWindows()
// Calculate spare vertical space, to be shared between non-fixed windows
int spareSpacePerWindow;
if (requiresVScrollBar) {
if (requiresVScrollBar || (nonFixedWindows == 0)) {
spareSpacePerWindow = 0;
} else {
spareSpacePerWindow = (mdiSize.height() - minHeight) / nonFixedWindows;