mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
don't show detail until it should be visible
This commit is contained in:
parent
0b35227395
commit
a14df299c8
1 changed files with 6 additions and 8 deletions
|
|
@ -1486,19 +1486,14 @@ class ErrorDetailWidget(QtWidgets.QWidget):
|
|||
main_layout.addWidget(error_detail_input, 0)
|
||||
main_layout.addStretch(1)
|
||||
|
||||
error_detail_input.setVisible(not error_detail_expand_btn.collapsed)
|
||||
|
||||
error_detail_top.clicked.connect(self._on_detail_toggle)
|
||||
|
||||
self._error_detail_top = error_detail_top
|
||||
self._error_detail_expand_btn = error_detail_expand_btn
|
||||
self._error_detail_input = error_detail_input
|
||||
|
||||
def showEvent(self, event):
|
||||
super().showEvent(event)
|
||||
# Calling this in __init__ does not seem to propagate the visibility
|
||||
# correctly
|
||||
self._error_detail_input.setVisible(
|
||||
not self._error_detail_expand_btn.collapsed
|
||||
)
|
||||
|
||||
def set_detail(self, detail):
|
||||
if not detail:
|
||||
|
|
@ -1520,7 +1515,10 @@ class ErrorDetailWidget(QtWidgets.QWidget):
|
|||
|
||||
def _set_visible_inputs(self, visible):
|
||||
self._error_detail_top.setVisible(visible)
|
||||
self._error_detail_input.setVisible(visible)
|
||||
input_visible = visible
|
||||
if input_visible:
|
||||
input_visible = not self._error_detail_expand_btn.collapsed
|
||||
self._error_detail_input.setVisible(input_visible)
|
||||
|
||||
def _on_detail_toggle(self):
|
||||
self._error_detail_expand_btn.set_collapsed()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue