WpfDesigner icon indicating copy to clipboard operation
WpfDesigner copied to clipboard

Fix exception when rotating skewed item.

Open jongleur1983 opened this issue 6 years ago • 1 comments

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.

jongleur1983 avatar Oct 05 '19 10:10 jongleur1983

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 avatar Oct 11 '19 17:10 jongleur1983