* Disable result pane layout while populating for a slight performance boost.
authorUrban Wallasch <urban.wallasch@freenet.de>
Mon, 21 Jun 2021 20:35:55 +0000 (22:35 +0200)
committerUrban Wallasch <urban.wallasch@freenet.de>
Mon, 21 Jun 2021 20:35:55 +0000 (22:35 +0200)
kanjidic.py

index 9dd69d1be26ef276bac0ba0be6acaeabde5127c0..47ae445f5e314b5c7520e53d73e9bc428c61e654 100755 (executable)
@@ -421,6 +421,7 @@ class zFlowLayout(QLayout):
             lineHeight = max(lineHeight, item.sizeHint().height())
         return y + lineHeight - rect.y() + bottom
 
+
 class zFlowScrollArea(QScrollArea):
     def __init__(self, *args, **kwargs):
         super().__init__(*args, **kwargs)
@@ -435,8 +436,10 @@ class zFlowScrollArea(QScrollArea):
         pane = QWidget()
         self.setWidget(pane)
         layout = zFlowLayout(self.widget(), 0, 0, 0)
+        layout.setEnabled(False)
         for tl in tiles:
             layout.addWidget(tl)
+        layout.setEnabled(True)
         self.setUpdatesEnabled(True)
 
     def insert(self, w):