If a project with a non-zero border is loaded, the color picker picks the wrong pixels and thus values, making it wothless. We need to consider the border.
Designs
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
New Issue: While the consideration of the border is now fixed, we still miss changes in the pixel values due to distortion. Currently the undistortion needs to be disabled for the color picker to work correctly. Ideally this would not be the case.
By Kilic, Deniz on 2020-09-09T16:17:49 (imported from GitLab project)
Solved the prior problems by using Petrack::getMousePosOnImage(). But this breaks the unit test. The pixel is no longer determined correctly when using the simulated Qt Events from QTest. Even after adding a mouse move event to the right position.
"Won't Do" => actually we will do this. In Qt 6 we will drop some legacy code paths and this stuff will start working fine.
GUI unit testing is unusual as is. So I am thinking about just dropping the unit test and replacing it with manual testing. Cumbersome, but maybe more sustainable than writing more and more complicated unit testing code, because the QTest framework doesn't work poperly. The alternative would be to figure out how to do it properly and write our own test helper function for mouse move events.
By the way: This problem was solved via clicking two times, since a hover event (not mouse move event, but you cannot simulate a hover event at all with QTest) gets sent to the GraphicsView after the click (with associated MousePressedEvent). So the first click sets the mMousePosOnImage variable and the second one actually uses it.
By Kilic, Deniz on 2020-09-16T08:08:58 (imported from GitLab project)