Small selection layer at 0,0 displayed scaled to fit canvas

Bug #1077960 reported by Don McComb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pinta
Fix Released
Medium
Cameron White

Bug Description

I introduced this bug with my fix to bug#1064018 <blush>.

To reproduce:
1) Create a new 800x600 blank image.
2) Scribble with the paint brush somewhere in the middle of the image
3) Use the Rectangle Select tool to select the scribble (a small portion of the complete image)
4) Copy and paste
5) *** The pasted image (the selection layer) fills the canvas ***

Also:
6a) Use the Move Selected Pixels tool to move the selection away from 0,0 (the top-left corner).
6b) Note that the selection layer is displayed correctly.

And:
7a) Use the Move Selected Pixels tool to move the selection back to 0,0 (the top-left corner).
7b) *** Note that the selection layer is displayed incorrectly again - scaled to fill the canvas. ***

I have attached a patch which fixes the issue, but at this stage I don't completely understand why and how it fixes the issue and if this is the best way to fix it.

Revision history for this message
Don McComb (don-mccomb) wrote :
Changed in pinta:
assignee: nobody → Don McComb (don-mccomb)
Revision history for this message
Cameron White (cameronwhite91) wrote :

I think the proper way to fix this is to make sure that the selection layer is at least the size of the image, which avoids the scaling: https://github.com/PintaProject/Pinta/commit/03cbde0541bec4e1bac4c7028c43e2a104167903

Changed in pinta:
assignee: Don McComb (don-mccomb) → Cameron White (cameronwhite91)
importance: Undecided → Medium
milestone: none → 1.5
status: New → Fix Committed
Changed in pinta:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.