Merge pull request #1420 from ynput/bugfix/restore-saved-painter

Scene Inventory: Restore saved painter
This commit is contained in:
Jakub Trllo 2025-08-28 16:42:11 +02:00 committed by GitHub
commit 1c8d59bdd3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -127,6 +127,7 @@ class SelectVersionComboBox(QtWidgets.QComboBox):
status_text_rect.setLeft(icon_rect.right() + 2)
if status_text_rect.width() <= 0:
painter.restore()
return
if status_text_rect.width() < metrics.width(status_name):
@ -144,6 +145,7 @@ class SelectVersionComboBox(QtWidgets.QComboBox):
QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter,
status_name
)
painter.restore()
def set_current_index(self, index):
model = self._combo_view.model()