From a88485ef1842590746c2173d2579f2acaa41a08f Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 29 Oct 2021 18:49:51 +0200 Subject: [PATCH] set style and resize on first show --- openpype/tools/context_dialog/window.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openpype/tools/context_dialog/window.py b/openpype/tools/context_dialog/window.py index 07263e85fc..55dc40f745 100644 --- a/openpype/tools/context_dialog/window.py +++ b/openpype/tools/context_dialog/window.py @@ -130,6 +130,8 @@ class ContextDialog(QtWidgets.QDialog): self._set_context_project = None self._set_context_asset = None + self._first_show = True + # Output of dialog self._context_to_store = { "project": None, @@ -141,6 +143,13 @@ class ContextDialog(QtWidgets.QDialog): self._strict = strict self._validate_strict() + def showEvent(self, event): + super(ContextDialog, self).showEvent(event) + if self._first_show: + self._first_show = False + self.setStyleSheet(style.load_stylesheet()) + self.resize(600, 700) + def _on_asset_refresh_timer(self): self._assets_widget.refresh()