SVN commit 645355 by cgilles:
digiKam from trunk : bug fix with autozoom function : with my last changes about zoom management in editor, the zoom factor is computed just before to show the editor windows. The autozoom function compute the ratio value using the canvas size... and at the first time to launch editor, the size is null... result : zoom factor is infinite, duing a division calculation (i'm so surprize to not have an "div by 0" exception...)
This patch fix this problem. Normally, with autozoom, the image will be always displayed.
CCMAIL:
[hidden email]
M +5 -1 canvas.cpp
--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/canvas.cpp #645354:645355
@@ -374,6 +374,8 @@
float Canvas::calcAutoZoomFactor()
{
+ if (!d->im->imageValid()) return d->zoom;
+
double srcWidth = d->im->origWidth();
double srcHeight = d->im->origHeight();
double dstWidth = contentsRect().width();
@@ -448,7 +450,9 @@
}
updateContentsSize();
- viewport()->update();
+
+ // No need to repaint. its called
+ // automatically after resize
}
void Canvas::viewportPaintEvent(QPaintEvent *e)
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel