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

Add commands to navigate frames with same tag #887

Merged
merged 1 commit into from Dec 5, 2015

Conversation

Projects
None yet
2 participants
@TheKK
Contributor

TheKK commented Dec 5, 2015

This should fix #556 (#879)

@dacap

This comment has been minimized.

Show comment
Hide comment
@dacap

dacap Dec 5, 2015

Member

I'm not sure about this solution. Should we add new commands or a user-defined configuration flag to modify GotoPreviousFrame/GotoNextFrame behavior?

Member

dacap commented Dec 5, 2015

I'm not sure about this solution. Should we add new commands or a user-defined configuration flag to modify GotoPreviousFrame/GotoNextFrame behavior?

FrameTag* tag = get_animation_tag(sprite, currentFrame);
frame_t frameToGo = currentFrame + frame_t(1);
if (frameToGo > tag->toFrame())

This comment has been minimized.

@dacap

dacap Dec 5, 2015

Member

I didn't check this in runtime, but I think tag can be nullptr, so this line crashes if the command is used in animations without tags.

@dacap

dacap Dec 5, 2015

Member

I didn't check this in runtime, but I think tag can be nullptr, so this line crashes if the command is used in animations without tags.

@TheKK

This comment has been minimized.

Show comment
Hide comment
@TheKK

TheKK Dec 5, 2015

Contributor

I just found that we can pass parameters to commands :P
Solution which uses user-defined flag should be better than current one, since lots of duplicated code exist now.

Contributor

TheKK commented Dec 5, 2015

I just found that we can pass parameters to commands :P
Solution which uses user-defined flag should be better than current one, since lots of duplicated code exist now.

@dacap

This comment has been minimized.

Show comment
Hide comment
@dacap

dacap Dec 5, 2015

Member

I just found that we can pass parameters to commands :P

😄 Anyway in this case I'm not talking about command parameters.

I'm talking about a preference option in pref.xml that you can check using Preference::instance() and that can be changed from OptionsWindow (options.xml)

The UndoCommand is a good example about one command which its behavior changes with a user-defined option.

Member

dacap commented Dec 5, 2015

I just found that we can pass parameters to commands :P

😄 Anyway in this case I'm not talking about command parameters.

I'm talking about a preference option in pref.xml that you can check using Preference::instance() and that can be changed from OptionsWindow (options.xml)

The UndoCommand is a good example about one command which its behavior changes with a user-defined option.

@TheKK

This comment has been minimized.

Show comment
Hide comment
@TheKK

TheKK Dec 5, 2015

Contributor

I'm not a professional digital artist but I think during working I'll need both goto next frame and goto next frame with same tag as well and might use them frequently. As my opinion, these two commands should be available at the same time. Defined their behaviour with global preference looks not very reasonable to me.

What do you think?

Contributor

TheKK commented Dec 5, 2015

I'm not a professional digital artist but I think during working I'll need both goto next frame and goto next frame with same tag as well and might use them frequently. As my opinion, these two commands should be available at the same time. Defined their behaviour with global preference looks not very reasonable to me.

What do you think?

@dacap

This comment has been minimized.

Show comment
Hide comment
@dacap

dacap Dec 5, 2015

Member

I think during working I'll need both goto next frame and goto next frame with same tag

You are right. Also it was my original idea in #556 😄 I'll merge this PR, it looks fine as it is (don't worry about command params).

Thanks for your help! 😉

Member

dacap commented Dec 5, 2015

I think during working I'll need both goto next frame and goto next frame with same tag

You are right. Also it was my original idea in #556 😄 I'll merge this PR, it looks fine as it is (don't worry about command params).

Thanks for your help! 😉

dacap added a commit that referenced this pull request Dec 5, 2015

Merge pull request #887 from TheKK/moveFrameInTaggedLoop
Add commands to navigate frames with same tag

@dacap dacap merged commit 45e4c46 into aseprite:master Dec 5, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@TheKK

This comment has been minimized.

Show comment
Hide comment
@TheKK

TheKK Dec 5, 2015

Contributor

Wait! The tag bug is still there!

Contributor

TheKK commented Dec 5, 2015

Wait! The tag bug is still there!

@dacap

This comment has been minimized.

Show comment
Hide comment
@dacap

dacap Dec 5, 2015

Member

I'll fix it. Don't worry.

Member

dacap commented Dec 5, 2015

I'll fix it. Don't worry.

dacap added a commit that referenced this pull request Dec 5, 2015

Fix crash on GotoNext/PreviousFrameWithSameTagCommands when there is …
…no tag

Some other minor changes as avoid casting int <-> frame_t because now
frame_t is a typedef (some time ago it was a class and those cast were
necessary).

Related to #887

@dacap dacap added this to the v1.1 milestone Dec 5, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment