[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [digikam] /: When zooming by setting the zoom rate (slider), use the current view center as zoom anc
From:       Marcel Wiesweg <marcel.wiesweg () gmx ! de>
Date:       2012-07-08 12:09:02
Message-ID: 20120708120902.78EDFA6094 () git ! kde ! org
[Download RAW message or body]

Git commit c778bc15246604ad122b1e3e6817048b95e90244 by Marcel Wiesweg.
Committed on 08/07/2012 at 14:08.
Pushed by mwiesweg into branch 'master'.

When zooming by setting the zoom rate (slider), use the current view center as zoom anchor, not top-left.

BUG: 296786

M  +2    -1    NEWS
M  +3    -2    digikam/views/stackedview.cpp

http://commits.kde.org/digikam/c778bc15246604ad122b1e3e6817048b95e90244

diff --git a/NEWS b/NEWS
index bb7705d..73463e9 100644
--- a/NEWS
+++ b/NEWS
@@ -5,5 +5,6 @@ NEW FEATURES:
 
 BUGFIXES FROM KDE BUGZILLA (alias B.K.O | http://bugs.kde.org):
 
-001 ==> 
+001 ==> 296786 - Zoom to 100% pans to the top-left corner.
+002 ==>
 
diff --git a/digikam/views/stackedview.cpp b/digikam/views/stackedview.cpp
index dcdc089..7684df7 100644
--- a/digikam/views/stackedview.cpp
+++ b/digikam/views/stackedview.cpp
@@ -464,12 +464,13 @@ bool StackedView::minZoom()
 
 void StackedView::setZoomFactor(double z)
 {
-    d->imagePreviewView->layout()->setZoomFactor(z);
+    // Giving a null anchor means to use the current view center
+    d->imagePreviewView->layout()->setZoomFactor(z, QPoint());
 }
 
 void StackedView::setZoomFactorSnapped(double z)
 {
-    d->imagePreviewView->layout()->setZoomFactor(z);
+    d->imagePreviewView->layout()->setZoomFactor(z, QPoint(), SinglePhotoPreviewLayout::SnapZoomFactor);
 }
 
 double StackedView::zoomFactor()
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic