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 exception when rotating skewed item. #63

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jongleur1983
Copy link

@jongleur1983 jongleur1983 commented Oct 5, 2019

Work in progress to fix issue #36 - starting with a failing unit test.
The test reproduces the described issue (I hope) and fails as expected, yet by throwing the same exception described by @mnusr
Not sure I'll get a solution, but I'm working on it.

Update: The issue in the demo app is solved.
The unit test doesn't, yet - so I might be doing something wrong there.

But: The demo app has a strange rotation behaviour now - not sure yet how the rotation angle is calculated from mouse input, this might be broken somehow on Skewed items.
I don't think that's based on the changes in this PR, but wasn't just not visible before.

This test should be extended later to check the correct output, but first step would be just not to crash.
@jongleur1983 jongleur1983 changed the title [WIP] Fix rotating skewed item [WIP] Fix exception when rotating skewed item. Oct 11, 2019
@jongleur1983
Copy link
Author

Mentioning you, @jogibear9988 as you answered in the ticket before and "promised" to have a look at the fix:

I revoke from fixing the underlying issue in the UI as I fail to get around the overall UI and I don't think I'm going to invest much more time in this project in the next time.
Therefore I remove the WIP-marker from this PR and leave it as it is.

I'm happy to change what's necessary when I know what to do, so any hints are welcome.

AppVeyor fails for two reasons:

  • my new unit test is failing. This happens as the test is more an integration test right now and I don't know how to write a proper test without changing much of the structure. The problem is that although the ModelTools get an IDesignPanel it casts to the concrete DesignPanel class internally - which fails with a mock in the tests. I'd consider this bad design but was afraid to just relax the code in ModelTools accordingly (ignoring the designPanel-stuff when it's not the concrete class instead of enforcing that).
  • the other failing unit tests fails (at least for me locally) in master as well, so it seems to not be caused by my changes.

@jongleur1983 jongleur1983 changed the title [WIP] Fix exception when rotating skewed item. Fix exception when rotating skewed item. Oct 11, 2019
@jongleur1983 jongleur1983 marked this pull request as ready for review October 11, 2019 17:52
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.

1 participant