-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve undo log messages in the 2D editor for additional context #42229
Improve undo log messages in the 2D editor for additional context #42229
Conversation
fc055da
to
a15065e
Compare
drag_selection, | ||
vformat( | ||
TTR("Set CanvasItem \"%s\" Pivot Offset to (%d, %d)"), | ||
drag_selection[0]->get_name(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure that drag_selection.size() > 0
in all this code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the drag_selection can be empty in that part of the code. Unless there's a way to trigger the rotation, pivot dragging, etc... without a selected node. It might happen in some weird buggy situation though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, maybe there should be some ERR_FAIL_COND(drag_selection.size());
at the start of each helper method, just to be safe?
Note that some of those methods actually mutate drag_selection
based on filtering selection
too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump. If you think it's safe I don't mind merging as is, but we need some resolution to this comment.
a15065e
to
9f46b69
Compare
Undo/redo log messages will now specify the modified node's name (or number of modified nodes if several were modified). On top of that, the new position/rotation/scale/pivot offset will also be mentioned in the message.
9f46b69
to
996740d
Compare
Thanks! |
Cherry-picked for 3.2.4. |
Undo/redo log messages will now specify the modified node's name (or number of modified nodes if several were modified). On top of that, the new position/rotation/scale/pivot offset will also be mentioned in the message.
If this feature is desired, I'll look into implementing it for the 3D editor in a future PR 🙂
Preview
Before
After