Skip to content
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

Fix drop pixels when drag/modifying tag range while transform state is active (fiix #4375) #4418

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Gasparoken
Copy link
Member

Before this fix, aseprite displayed an error message instead of dropping pixels.

Issue #4375 was originally due to a crash when dragging a tag while the transformation was active. But it was fixed via 7905acf (related to #4367), then the original action resulted in an error message, additionally canceling the dragging of the label range.

fix #4375

…s active (fiix aseprite#4375)

Before this fix, aseprite displayed an error message instead of dropping pixels.
@aseprite-bot
Copy link
Collaborator

clang-tidy review says "All clean, LGTM! 👍"

if (m_editor) {
if (auto movingPixels = dynamic_cast<MovingPixelsState*>(m_editor->getState().get()))
movingPixels->onDropPixels(ContextBarObserver::DropPixels);
}
Copy link
Member

Choose a reason for hiding this comment

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

Works as expected. Just want to share some thoughts about this:
I like that all the code is here in one place, but I wonder what should we do if another widget/component needs to be aware of the tag resizing of the timeline, should we keep adding code here as well? This led me to think that an event/observer based approach might have been a good fit for this fix, but it would have been more complex to implement...so I'm not sure it worth it, also because I think that the timeline is going to be reimplemented or something. So maybe we shouldn't worry about this right now, and just refactor if the need arises in the future.

@martincapello martincapello assigned dacap and unassigned martincapello Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when drag/modifying tag range while transform state is active.
4 participants