Ticket #6843: tabbedtoolbar.py.diff

File tabbedtoolbar.py.diff, 932 bytes (added by Tristan Croll, 3 years ago)

Minimal "fix"

  • src/bundles/ui/src/widgets/tabbedtoolbar.py

    diff --git a/src/bundles/ui/src/widgets/tabbedtoolbar.py b/src/bundles/ui/src/widgets/tabbedtoolbar.py
    index 92e1be22c..37f5e6624 100644
    a b class _Section(QWidgetAction):  
    244244            self._layout_buttons(w)
    245245            w.updateGeometry()
    246246            w.adjustSize()
     247        self._redo_pending = False
    247248
    248249    def set_compact(self, on_off):
    249250        if self.compact == on_off:
    class _Section(QWidgetAction):  
    342343            return
    343344        button_info.enabled = enabled
    344345        if redo:
    345             self._redo_layout()
     346            pending = getattr(self, '_redo_pending', False)
     347            if not pending:
     348                from Qt.QtCore import QTimer
     349                QTimer.singleShot(10, self._redo_layout)
     350                self._redo_pending = True
    346351
    347352
    348353class TabbedToolbar(QTabWidget):