* Shrink grid size, if not enough thumbnails to fill initial dimensions.
authorUrban Wallasch <urban.wallasch@freenet.de>
Wed, 12 May 2021 18:39:26 +0000 (20:39 +0200)
committerUrban Wallasch <urban.wallasch@freenet.de>
Wed, 12 May 2021 18:39:26 +0000 (20:39 +0200)
ffpreview.py

index 6b813cd1273ce250f5ff84c2c7ea6ca16c4ca7c5..108be535cc0ffc981c2bd1157d55b5e2f35daf2a 100755 (executable)
@@ -465,6 +465,10 @@ class sMainWindow(QMainWindow):
             x += 1
             if x >= cfg['grid_columns']:
                 x = 0; y += 1
+        if y < cfg['grid_rows']:
+            cfg['grid_rows'] = y + 1
+        if y == 0 and x < cfg['grid_columns']:
+            cfg['grid_columns'] = x
         self.scrollframe.setUpdatesEnabled(True)
         self.set_cursor()