Skip to content

Fix rotation of certain objects breaking change states#36852

Merged
peppy merged 2 commits intoppy:masterfrom
bdach:holy-recreate-batman
Mar 6, 2026
Merged

Fix rotation of certain objects breaking change states#36852
peppy merged 2 commits intoppy:masterfrom
bdach:holy-recreate-batman

Conversation

@bdach
Copy link
Copy Markdown
Collaborator

@bdach bdach commented Mar 6, 2026

Closes #36830.

This is a regression from #36681.

Due to the aforementioned pull request's changes, rotating an object that could not scale on the X or Y axis (due to having that dimension zero) would trigger CanScale{X,Y} to change as said rotated object's width or height became not zero. This in turn would cause SelectionBox to fully recreate all of its handles and buttons, including the rotation handle that initiated the rotation operation, therefore dropping the ongoing rotation operation completely and leaving the editor in a half-broken state.

The suggested solution here is to recreate handles more granularly to prevent this from happening. (I've probably not improved it as much as I could have, but this is as far as I'm willing to go for now unless review finds it unpalatable.)

bdach added 2 commits March 6, 2026 11:21
Closes ppy#36830.

This is a regression from ppy#36681.

Due to the aforementioned pull request's changes, rotating an object
that could not scale on the X or Y axis (due to having that dimension
zero) would trigger `CanScale{X,Y}` to change as said rotated object's
width or height became not zero. This in turn would cause `SelectionBox`
to *fully recreate* all of its handles and buttons, *including* the
rotation handle that initiated the rotation operation, therefore
dropping the ongoing rotation operation completely and leaving the
editor in a half-broken state.

The suggested solution here is to recreate handles more granularly to
prevent this from happening. (I've probably not improved it as much as
I could have, but this is as far as I'm willing to go for now unless
review finds it unpalatable.)
@bdach bdach requested a review from peppy March 6, 2026 10:28
@bdach bdach self-assigned this Mar 6, 2026
@bdach bdach added the type/reliability Deals with game crashing or breaking in a serious way. label Mar 6, 2026
@bdach bdach moved this from Inbox to Pending Review in osu! team task tracker Mar 6, 2026
Copy link
Copy Markdown
Member

@peppy peppy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks to work 👍

@peppy peppy merged commit 0d74983 into ppy:master Mar 6, 2026
9 of 10 checks passed
@github-project-automation github-project-automation bot moved this from Pending Review to Done in osu! team task tracker Mar 6, 2026
@bdach bdach deleted the holy-recreate-batman branch March 6, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:editor size/L type/reliability Deals with game crashing or breaking in a serious way.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Rotating objects in certain ways causes undo to break, and unable to re-rotate

2 participants