[Digikam-devel] extragear/graphics/digikam/imageplugins/freerotation

Andi Clemens andi.clemens at gmx.net
Wed Oct 21 11:27:46 BST 2009


SVN commit 1038521 by aclemens:

Do not set the newSize to -1 of no rotation has been applied, but set the
original size.

These labels are still wrong and (for me) not really needed. If you rotate an
image, it will show the newSize of the previewed image data, not the original
one.
This is actually wrong, because the size doesn't represent the real outcome.

I would suggest to remove those labels completely, but I guess this should be
discussed before ;-)

So what do you think?

CCMAIL:digikam-devel at kde.org

 M  +4 -2      freerotationtool.cpp  


--- trunk/extragear/graphics/digikam/imageplugins/freerotation/freerotationtool.cpp #1038520:1038521
@@ -462,8 +462,10 @@
     d->previewWidget->updatePreview();
     QSize newSize = dynamic_cast<FreeRotation *>(filter())->getNewSize();
     QString temp;
-    d->newWidthLabel->setText(temp.setNum( newSize.width()) + i18n(" px") );
-    d->newHeightLabel->setText(temp.setNum( newSize.height()) + i18n(" px") );
+    int new_w = (newSize.width()  == -1) ? w : newSize.width();
+    int new_h = (newSize.height() == -1) ? h : newSize.height();
+    d->newWidthLabel->setText(temp.setNum(new_w)  + i18n(" px") );
+    d->newHeightLabel->setText(temp.setNum(new_h) + i18n(" px") );
 }
 
 void FreeRotationTool::putFinalData(void)



More information about the Digikam-devel mailing list