Skip to content

frontend: Clean up and adjustments to SceneTree#13622

Open
Warchamp7 wants to merge 8 commits into
obsproject:masterfrom
Warchamp7:scene-tree-drag-tweak
Open

frontend: Clean up and adjustments to SceneTree#13622
Warchamp7 wants to merge 8 commits into
obsproject:masterfrom
Warchamp7:scene-tree-drag-tweak

Conversation

@Warchamp7

@Warchamp7 Warchamp7 commented Jul 4, 2026

Copy link
Copy Markdown
Member

Description

A medley of clean up to the SceneTree widget.

Pile o' commits:

  • Split out scene tree grid calculation
    • Moved this logic into it's own function rather than the hacky approach of forcing a resizeEvent which might have other side effects
  • Remove empty eventFilter
    • Function is empty and always has been since it was added? Perhaps a misunderstanding of Qt from years ago.
  • Remove deferred scenesReordered signal
  • Block signals while updating the grid list
    • This also fixes a bug where reordering the grid list caused OBS to swap to the scene at the target index and then immediately swap back to the scene being dragged. Visually this bug was invisible until libobs: Fix interrupted transitions #13088 fixed interrupted transitions.
  • Restore old safety guard on selectionChanged
    • An old QTBUG allowed the scene to be deselected by clicking in the empty area of the QList. This was (allegedly) fixed at some point, however it is still possible to deselect the scene by clicking and dragging in the empty area now sooo we need this guard again.
  • Simplify grid reordering logic
    • There's a lot going on here and I will type it up later.
  • Adjust style refresh logic
    • Polish the widget instead of setting/clearing a stylesheet.
  • Codestyle cleanup

Motivation and Context

Originally I was trying to chase down a UI deadlock a friend ran into when changing scenes. In the DMP I received from them, the main thread was stuck inside the SceneTree's drag event. I have yet to determine if the SceneTree was actually responsible in any way for that lock up, but looking around at what could have potentially caused it led me to the resizeEvent stuff.

How Has This Been Tested?

Tested all the functionality I changed. Reordered scenes in grid mode, adjusted the scene tree styling locally. Resized the dock before and after reordering items. Ensured Multiview behaved correctly in list and grid mode when making changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Tweak (non-breaking change to improve existing functionality)
  • Code cleanup (non-breaking change which makes code smaller or more readable)

Checklist:

  • I have read the contributing document.
  • My code has been run through clang-format.
  • My code follows the project's style guidelines
  • My code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@Warchamp7 Warchamp7 added kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Non-breaking change which makes code smaller or more readable area/ui-ux Anything to do with changes or additions to UI/UX elements. kind/tech-debt labels Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ui-ux Anything to do with changes or additions to UI/UX elements. kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Non-breaking change which makes code smaller or more readable kind/tech-debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant