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

Remove "Cancelled by user" dialog that happens when the user tries to move an animated object #693

Closed
unternehmen opened this Issue Dec 30, 2018 · 6 comments

Comments

3 participants
@unternehmen
Copy link

unternehmen commented Dec 30, 2018

Synfig version & platform:
1.3.10, Commit 064ca47 (Dec 22 2018)
Debian GNU/Linux 9, x86_64

Issue description:
When you try to move an object whose position is animated, a dialog asks if you want to apply an offset to the animated parameters. If you press "no," a second dialog appears which says "Set Layer Parameter (...): Origin: Cancelled by user" and looks like this:

screenshot from 2018-12-29 21-22-59

It seems like this dialog interrupts the workflow of the user, and it does not provide new information since the user intentionally chooses not to apply the offset to the parameter. I believe the user experience would be improved if this dialog box was not present.

@BobSynfig

This comment has been minimized.

Copy link
Collaborator

BobSynfig commented Dec 30, 2018

Done :)

@unternehmen

This comment has been minimized.

Copy link
Author

unternehmen commented Dec 30, 2018

Thanks, I tried your branch, and the dialog no longer appears. However seems to cause an issue. if I press "no" on the offset dialog, it applies the offset anyway instead of canceling it. I think this is because

throw Error(_("Cancelled by user"));

was responsible for breaking out of Action::ValueDescSet::prepare(), but now the throw statement is gone so the function just continues and applies the offset.

I would like to work out a solution on my fork if that is okay with you. (I want to join development and this seems like an easy enough first issue :-)

unternehmen added a commit to unternehmen/synfig that referenced this issue Dec 30, 2018

@unternehmen

This comment has been minimized.

Copy link
Author

unternehmen commented Dec 30, 2018

I have added a commit which makes canceling work again. Can someone double-check it? 👍

BobSynfig added a commit to BobSynfig/synfig that referenced this issue Dec 30, 2018

@BobSynfig

This comment has been minimized.

Copy link
Collaborator

BobSynfig commented Dec 30, 2018

Argh, I just pushed another way, tricky way, yours looks a lot more clean ^^
BobSynfig@3d5aa74

@unternehmen

This comment has been minimized.

Copy link
Author

unternehmen commented Dec 31, 2018

Oops! :"-D

@morevnaproject

This comment has been minimized.

Copy link
Member

morevnaproject commented Jan 2, 2019

@unternehmen @BobSynfig Thank you for your contributions for solving this issue!

After examining your pull requests #695 and #696 I found that the silent error handling is already implemented.
Please check line 133 here:

// Perform the action
try { action->perform(); }
catch(Action::Error err) {
uim->task(action->get_local_name()+' '+_("Failed"));
if (err.get_type() != Action::Error::TYPE_UNABLE) {
if (err.get_desc().empty())
uim->error(action->get_local_name() + ": " + etl::strprintf("%d", err.get_type()));
else
uim->error(action->get_local_name() + ": " + err.get_desc());
}
// If action failed for whatever reason, just return false and do
// not add the action onto the list
return false;

So, I think replacing
throw Error(_("Cancelled by user"));
to
throw Error(Error::TYPE_UNABLE);
will be sufficient. ^__^

@morevnaproject morevnaproject added this to Done in Releases Jan 4, 2019

BobSynfig added a commit to BobSynfig/synfig that referenced this issue Jan 4, 2019

BobSynfig added a commit to BobSynfig/synfig that referenced this issue Jan 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.