Bug 134590 - auto zoom settings (middle mouse button) are cleared when image orientation changes
Summary: auto zoom settings (middle mouse button) are cleared when image orientation c...
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
: 130145 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-24 15:10 UTC by Janet
Modified: 2012-10-19 13:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janet 2006-09-24 15:10:09 UTC
Version:           1.4.0 (using KDE 3.5.4, Debian Package 4:3.5.4-3 (testing/unstable))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.17.9-slh-smp-1

I use the middle mouse button to switch between "fit to window" size and 100% size. But when I scroll through the pictures (mouse wheel) and there's a picture that has another orientation (landscape after a buch of portrait images or vice-versa) the middle mouse button action is set from 100% to some obscure small 25% so I have to re-enable the 100% first. With the next change in orientation the setting is cleared again. The weird thing is it does not happen with every picture every time (but 98%) and sometimes it is set to 32, to 27 or to 25%. Expected behaviour: the middle mouse button does not change the view settings on its own but toggles between two user given view modes until the user explicitly sets other modes.
Comment 1 Janet 2006-09-24 15:14:35 UTC
Well - does not exactly seem to be the orientation but a change in image proportions as far as I can see. E.g. when a picture in 4:3 follows a picture in 2:3 format.
Comment 2 Christopher Martin 2006-09-30 19:21:47 UTC
I can confirm that something strange is happening. I will open a directory of images, and turn on 'Fit to Window' with the middle-mouse button, and scroll through some images. When I hit the middle-mouse button to turn off 'Fit to Window', I often am left with an image that is 102% zoomed, or 97%, or something like that, instead of the 100% I expected. I doesn't happen all the time. Perhaps there is a connection to changing aspect ratios, but I haven't tested that.
Comment 3 Aurelien Gateau 2006-11-07 14:26:00 UTC
SVN commit 602991 by gateau:

Do not store auto-zoom values in mZoomBeforeAuto
BUG: 134590


 M  +10 -1     imageview.cpp  


--- trunk/extragear/graphics/gwenview/gvcore/imageview.cpp #602990:602991
@@ -450,6 +450,10 @@
 	d->mGamma = 100;
 	d->mBrightness = 0;
 	d->mContrast = 100;
+	
+	if (!d->mLockZoom->isChecked()) {
+		d->mZoomBeforeAuto = 1.;
+	}
 }
 
 //------------------------------------------------------------------------
@@ -515,6 +519,7 @@
 
 
 void ImageView::updateZoom(ZoomMode zoomMode, double value, int centerX, int centerY) {
+	ZoomMode oldZoomMode = d->mZoomMode;
 	double oldZoom=d->mZoom;
 	d->mZoomMode=zoomMode;
 	KAction* checkedZoomAction=0;
@@ -525,7 +530,11 @@
 		Q_ASSERT(value!=0);
 		d->mZoom=value;
 	} else {
-		d->mZoomBeforeAuto=d->mZoom;
+		if (oldZoomMode == ZOOM_FREE) {
+			// Only store zoom before auto if we were in ZOOM_FREE mode, otherwise
+			// we will store the computed auto zoom value (Bug 134590)
+			d->mZoomBeforeAuto = d->mZoom;
+		}
 		d->mXCenterBeforeAuto=width()/2  + contentsX() + d->mXOffset;
 		d->mYCenterBeforeAuto=height()/2 + contentsY() + d->mYOffset;
 		
Comment 4 Aurelien Gateau 2006-11-07 18:13:03 UTC
*** Bug 130145 has been marked as a duplicate of this bug. ***
Comment 5 Michael Biech 2006-11-14 19:57:29 UTC
Excuse me, I just wanted to thank you, since this appeared in 1.4 too - at least for me.