Crash when picking color
mriale opened this issue · comments
When picking a color from a picture, PyDPainter crashed:
https://clips.twitch.tv/RepleteRealOtterKeyboardCat-Zg7yudfAY-RwkbjT
Looks like the mouse coordinates went outside the bounds of the canvas and caused the Surface get_at_mapped()
call to fail.
Need to constrain mouse coordinates to canvas in config.get_mouse_pixel_pos()
.
Was able to recreate:
- Press
F11
to make full screen - Magnify the extreme lower-right corner of the screen
- Zoom in or out to make the right and bottom edges have some gray color (off-canvas area)
- Click on the color dot to get the dropper
- Drag mouse around the lower right of the zoomed window
- Crash when dragged past lower-right edge of zoomed window (off-canvas)