[ui] Viewer2D: Add the pixel (x,y) values in the toolbar (editable)#2723
[ui] Viewer2D: Add the pixel (x,y) values in the toolbar (editable)#2723
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## develop #2723 +/- ##
===========================================
+ Coverage 76.74% 76.84% +0.10%
===========================================
Files 40 41 +1
Lines 6084 6132 +48
===========================================
+ Hits 4669 4712 +43
- Misses 1415 1420 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Everything works well as long as the mouse is hovering over the image.
If it is hovering in the 2D Viewer but outside of the image, the (x, y) coordinates display the last "recorded" position of the mouse on the image, but these displayed values do not correspond to the actual values of mousePosition and so the displayed RGB values are off as well. What seems to happen is that x and y are reset to 0 as soon as the mouse goes out of the image, the RGB values are updated to match the colors of pixel (0, 0), but the text fields for x and y still display the previous values. Modifying the values works, but for example, if I only modify x, y will still display the last recorded position while its value will actually still be 0.
Prior to this PR, the behaviour for RGB values was to display "--" when the mouse position was outside of the image. This can be discussed but I think we might want the same for the (x, y) coordinates: when hovering outside of the image, the values become "unset", and should the user choose to set them, only then would we display the corresponding RGB values.
…ouse hovered the image, to avoid ghost values
cbentejac
left a comment
There was a problem hiding this comment.
Everything's working functionally, just a few minor changes and we'll be good to go!
5ffdc67 to
278e95f
Compare
Co-authored-by: nicolas-lambert-tc <nicolas.lambert@technicolor.com>
… be closer to usual usage Co-authored-by: nicolas-lambert-tc <nicolas.lambert@technicolor.com>
278e95f to
663aeb8
Compare



Description
Add the ability to display and edit
x, yvalue of the currentrgba colordisplayed in the viewer2D.Features list
viewer2Dto display the pixel's coordinates