Repository navigation
frontend: Fix spinbox crash when right-clicking - #14159
Merged
Merged
Conversation
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
force-pushed
the
transform-loop-crash
branch
from
November 9, 2026 20:52
8f4f8b0 to
cd244a3
Compare
PatTheMav
approved these changes
Nov 9, 2026
7 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
mousePressEventlogic 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.mouseMoveEventalready 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
Checklist: