From 3c397a70b7dc5155660acdbf67c96109fe631dca Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Mon, 3 Oct 2022 11:52:22 +0200 Subject: [PATCH] fix shrinking --- openpype/tools/publisher/widgets/publish_frame.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/openpype/tools/publisher/widgets/publish_frame.py b/openpype/tools/publisher/widgets/publish_frame.py index c4ebb5be68..79bb865eb0 100644 --- a/openpype/tools/publisher/widgets/publish_frame.py +++ b/openpype/tools/publisher/widgets/publish_frame.py @@ -210,12 +210,17 @@ class PublishFrame(QtWidgets.QWidget): self._shrunken = shrunk - start = 0 - end = 0 anim_is_running = ( self._shrunk_anim.state() == self._shrunk_anim.Running ) + if not self.isVisible(): + if anim_is_running: + self._shrunk_anim.stop() + self._on_shrunk_anim_finish() + return + start = 0 + end = 0 if shrunk: start = self._top_content_widget.height() else: @@ -224,10 +229,6 @@ class PublishFrame(QtWidgets.QWidget): hint = self._top_content_widget.minimumSizeHint() end = hint.height() - if not self.isVisible(): - self._on_shrunk_anim_finish() - return - self._shrunk_anim.setStartValue(start) self._shrunk_anim.setEndValue(end) if not anim_is_running: