Skip to content

frontend: Fix spinbox crash when right-clicking - #14159

Merged
Warchamp7 merged 1 commit into
obsproject:masterfrom
Warchamp7:transform-loop-crash
Nov 9, 2026
Merged

Warchamp7 merged 1 commit into
obsproject:masterfrom
Warchamp7:transform-loop-crash

Conversation

@Warchamp7

@Warchamp7 Warchamp7 commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Description

This fixes a crash where right-clicking in the spinbox padding area would cause an infinite loop of the lineEdit seeing the click outside of it's region and ignoring it, causing it to re-propogate up to the spinbox again.

The lineEdit will handle a left click event outside it's region, as evidenced by this logic doing what is intended, so this restricts the handling to only the case we want.

Motivation and Context

The mousePressEvent logic exists to handle a user starting a drag inside the spinbox but not over the lineEdit itself. As such it only needs to care about left mouse button in the event.

mouseMoveEvent already has the same logic for the same reasons.

How Has This Been Tested?

Right-clicked in the spinbox padding of the Edit Transform window, observed no more crash.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

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 is not on the master branch.
  • 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 this to the OBS Studio 33.0 milestone Nov 5, 2026
@Warchamp7 Warchamp7 added kind/crash area/ui-ux Anything to do with changes or additions to UI/UX elements. labels Nov 5, 2026
@Warchamp7 Warchamp7 removed this from the OBS Studio 33.0 milestone Nov 9, 2026
@Warchamp7 Warchamp7 moved this from Ready For Review to Ready For Merge in Current Release Tracker (33.0) Nov 9, 2026
@Warchamp7 Warchamp7 added this to the OBS Studio 33.0 milestone Nov 9, 2026
The mousePressEvent logic exists to handle a user starting a drag
inside the spinbox but not over the lineEdit itself. As such it only
needs to care about left mouse button in the event.

This fixes a crash where right-clicking in the spinbox padding area
would crash due to an infinite loop of the lineEdit seeing the click
outside of it's region and ignoring it, causing it to re-propogate up
to the spinbox again.
@Warchamp7
Warchamp7 force-pushed the transform-loop-crash branch from 8f4f8b0 to cd244a3 Compare November 9, 2026 20:52
@Warchamp7
Warchamp7 merged commit 991c3b1 into obsproject:master Nov 9, 2026
15 checks passed
@Warchamp7
Warchamp7 deleted the transform-loop-crash branch November 9, 2026 22:25
@github-project-automation github-project-automation Bot moved this from Ready For Merge to Merged in Current Release Tracker (33.0) Nov 9, 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/crash

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

2 participants