mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
process app events before scrolling instead of each widget
This commit is contained in:
parent
b859ff99dd
commit
a706fecda4
5 changed files with 5 additions and 4 deletions
|
|
@ -258,6 +258,11 @@ class SettingsCategoryWidget(QtWidgets.QWidget):
|
|||
|
||||
def scroll_to(self, widget):
|
||||
if widget:
|
||||
# Process events which happened before ensurence
|
||||
# - that is because some widgets could be not visible before
|
||||
# this method was called and have incorrect size
|
||||
QtWidgets.QApplication.processEvents()
|
||||
# Scroll to widget
|
||||
self.scroll_widget.ensureWidgetVisible(widget)
|
||||
|
||||
def set_path(self, path):
|
||||
|
|
|
|||
|
|
@ -227,7 +227,6 @@ class DictConditionalWidget(BaseWidget):
|
|||
|
||||
if self.body_widget and not self.body_widget.is_expanded():
|
||||
self.body_widget.toggle_content(True)
|
||||
QtWidgets.QApplication.processEvents()
|
||||
|
||||
for input_field in self.input_fields:
|
||||
if input_field.make_sure_is_visible(path, scroll_to):
|
||||
|
|
|
|||
|
|
@ -861,7 +861,6 @@ class DictMutableKeysWidget(BaseWidget):
|
|||
|
||||
if self.body_widget and not self.body_widget.is_expanded():
|
||||
self.body_widget.toggle_content(True)
|
||||
QtWidgets.QApplication.processEvents()
|
||||
|
||||
for input_field in self.input_fields:
|
||||
if input_field.make_sure_is_visible(path, scroll_to):
|
||||
|
|
|
|||
|
|
@ -171,7 +171,6 @@ class DictImmutableKeysWidget(BaseWidget):
|
|||
|
||||
if self.body_widget and not self.body_widget.is_expanded():
|
||||
self.body_widget.toggle_content(True)
|
||||
QtWidgets.QApplication.processEvents()
|
||||
|
||||
for direct_child in self._direct_children_widgets:
|
||||
if direct_child.make_sure_is_visible(path, scroll_to):
|
||||
|
|
|
|||
|
|
@ -281,7 +281,6 @@ class ListWidget(InputWidget):
|
|||
|
||||
if self.body_widget and not self.body_widget.is_expanded():
|
||||
self.body_widget.toggle_content(True)
|
||||
QtWidgets.QApplication.processEvents()
|
||||
|
||||
for input_field in self.input_fields:
|
||||
if input_field.make_sure_is_visible(path, scroll_to):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue