Wrong zoom on crop to selection

Bug #670425 reported by magic3
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Pinta
Fix Released
Low
Unassigned

Bug Description

Pinta 0.5 - Windows 7

Select something with a zoom different from default. Then "Crop the selection". I get an image with zoom 100 % but the zoom value is the old one.

Revision history for this message
grofaty (grofaty) wrote :

I can also reproduce this problem in Pinta 0.5 on Ubuntu 10.10.

For example select 200% zoom from drop down list from toolbar. Crop picture and picture crops and picture zooms to 100% (which I like) but value in drop down list still displays 200% which is incorrect, it should display 100%.

Changed in pinta:
status: New → Confirmed
Jonathan Pobst (jpobst)
Changed in pinta:
importance: Undecided → Low
Revision history for this message
Khairuddin Ni'am (niam-nfinity) wrote :

Set zoom combo box active index to 11 (100% zoom scale)

Revision history for this message
Khairuddin Ni'am (niam-nfinity) wrote :

Update to use ActualSize action instead of setting the combo box directly.

Revision history for this message
Jonathan Pobst (jpobst) wrote :

I wonder what the desired behavior is in this case. I think the options are:

- Keep the zoom the same.
- Switch to Actual Size (100%).
- Switch to Fit to Window.

PDN keeps the zoom the same, and I think that's probably the correct choice. I don't see any reason why crop should change the current zoom.

I think this is especially important when cropping a large photo. You have it zoomed out to 25%, the user selects most of the photo to keep, hits crop, and all of the sudden the photo is zoomed to 100%, which would be jarring.

Revision history for this message
Khairuddin Ni'am (niam-nfinity) wrote :

How about the combination of option 2 and 3 ?
If the crop's actual size is smaller than the workspace, we show it on the actual size (100 % zoom). Otherwise, scale it to Fit to Window.

Revision history for this message
Jonathan Pobst (jpobst) wrote :

I think it's probably just best to keep it the same. Crop doesn't seem like an action that should change the zoom.

Revision history for this message
Khairuddin Ni'am (niam-nfinity) wrote :

Implementation option 1 (keep the zoom the same).

On my patch, I don't do this :

double original_scale = doc.Workspace.Scale;
doc.ImageSize = rect.Size;
doc.Workspace.CanvasSize = rect.Size;
doc.Workspace.Scale = original_scale;

because it will make user see the cropped image on the actual size and then see that cropped image on the current zoom scale. Although the transition happen very fast, I think it's a little bit annoying.

Revision history for this message
Khairuddin Ni'am (niam-nfinity) wrote :

Better readability patch than my previous patch : https://bugs.launchpad.net/pinta/+bug/670425/comments/7

Revision history for this message
Jonathan Pobst (jpobst) wrote :

Patch committed in https://github.com/jpobst/Pinta/commit/e49eefd2b1f316d6d63bea2044ab10479d23d910.

Thanks for the report and the patch!

Changed in pinta:
milestone: none → 0.6
status: Confirmed → Fix Committed
Revision history for this message
grofaty (grofaty) wrote :

I have tested on Pinta 0.6 on Windows XP sp3. It looks zoom solution is to preserve zoom. Problem solved.

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.