From: Urban Wallasch Date: Mon, 21 Jun 2021 20:35:55 +0000 (+0200) Subject: * Disable result pane layout while populating for a slight performance boost. X-Git-Tag: v0.1.0~89 X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=79b5e9e276c318212babe500645a6c2121576d62;p=jiten-pai.git * Disable result pane layout while populating for a slight performance boost. --- diff --git a/kanjidic.py b/kanjidic.py index 9dd69d1..47ae445 100755 --- a/kanjidic.py +++ b/kanjidic.py @@ -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):