Version: 0.9.0 (using KDE KDE 3.5.5) Installed from: Gentoo Packages Compiler: GCC 4.1.1 gcc (GCC) 4.1.1 (Gentoo 4.1.1-r1) OS: Linux If zooming in or out using the keyboard or the tool bar buttons, the center of the photo moves. The center of the current projection should be kept as center instead (common usability). Cheers Kevin
I can confirm this bug. It happens with 0.9.0 Kubuntu packages as well as with trunk compiled from SVN (r624276). (Is there any way that I can mark this bug as confirmed?)
SVN commit 644214 by cgilles: digikam from trunk : do not move editor viewport content when zoom in/out. BUG: 139790 M +16 -6 canvas.cpp --- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/canvas.cpp #644213:644214 @@ -391,8 +391,8 @@ emit signalSelected(false); } - int wZ = int(d->im->width()); - int hZ = int(d->im->height()); + int wZ = d->im->width(); + int hZ = d->im->height(); if (visibleWidth() > wZ || visibleHeight() > hZ) { @@ -835,11 +835,16 @@ if (d->autoZoom || maxZoom()) return; + float cpx = (contentsX() + visibleWidth() / 2.0) / d->zoom; + float cpy = (contentsY() + visibleHeight() / 2.0) / d->zoom; + d->zoom = d->zoom + 1.0/16.0; - d->im->zoom(d->zoom); - updateContentsSize(); + + viewport()->setUpdatesEnabled(false); + center((int)(cpx * d->zoom), (int)(cpy * d->zoom)); + viewport()->setUpdatesEnabled(true); viewport()->update(); emit signalZoomChanged(d->zoom); @@ -850,11 +855,16 @@ if (d->autoZoom || minZoom()) return; + float cpx = (contentsX() + visibleWidth() / 2.0) / d->zoom; + float cpy = (contentsY() + visibleHeight() / 2.0) / d->zoom; + d->zoom = d->zoom - 1.0/16.0; - d->im->zoom(d->zoom); + updateContentsSize(); - updateContentsSize(); + viewport()->setUpdatesEnabled(false); + center((int)(cpx * d->zoom), (int)(cpy * d->zoom)); + viewport()->setUpdatesEnabled(true); viewport()->update(); emit signalZoomChanged(d->zoom);
I believe this problem has been reintroduced with commit 649987.
It's fixed since commit #659987 : http://websvn.kde.org/trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/canvas.cpp?revision=650567&view=markup Gilles