Avoid divide by zero when no fixed windows

pull/1542/head
Jon Beniston 2022-12-20 23:17:31 +00:00
rodzic f2fe6ea940
commit dea4c1f285
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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;