]> git.sesse.net Git - kdenlive/commitdiff
Fix 'adjust to original size' and 'fit to width/height' for title and color clips...
authorTill Theato <root@ttill.de>
Wed, 10 Aug 2011 08:51:42 +0000 (08:51 +0000)
committerTill Theato <root@ttill.de>
Wed, 10 Aug 2011 08:51:42 +0000 (08:51 +0000)
svn path=/trunk/kdenlive/; revision=5827

CHANGELOG
src/geometrywidget.cpp

index 8a5a35753726780337ced675f722499f7b7515b4..36260b48361635fbb1c4a9ad0e0bd83eb1741f1a 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -21,6 +21,7 @@ HEAD
     * Allow use of different ffmpeg preset for 1st and 2nd render pass.
     * Notes widget: context menu now allows to insert clickable timecode to make easy reference to some place in the project.
 
+    * Fix 'adjust to original size' and 'fit to width/height' for title and color clips in geometry widget (pan and zoom, composite, affine).
     * Fix possible crash in DVD wizard chapters. (http://kdenlive.org/mantis/view.php?id=2264)
     * Do not duplicate effect stack after split audio but move audio effects only.
     * Fix issues related to the usage of comma as numeric separator in some locales.
index 04fe9085b601d6721bd9ae348a47bb1c13aebfde..65d042595b9cfa7962feaaafad181cb692944293 100644 (file)
@@ -711,7 +711,9 @@ void GeometryWidget::setFrameSize(QPoint size)
 
 void GeometryWidget::slotAdjustToFrameSize()
 {
-    if (m_frameSize == QPoint()) m_frameSize = QPoint(m_monitor->render->frameRenderWidth(), m_monitor->render->renderHeight());
+    if (m_frameSize == QPoint() || m_frameSize.x() == 0 || m_frameSize.y() == 0) {
+        m_frameSize = QPoint(m_monitor->render->frameRenderWidth(), m_monitor->render->renderHeight());
+    }
     m_spinWidth->blockSignals(true);
     m_spinHeight->blockSignals(true);
     m_spinWidth->setValue((int) (m_frameSize.x() / m_monitor->render->sar() + 0.5));
@@ -723,7 +725,9 @@ void GeometryWidget::slotAdjustToFrameSize()
 
 void GeometryWidget::slotFitToWidth()
 {
-    if (m_frameSize == QPoint()) m_frameSize = QPoint(m_monitor->render->frameRenderWidth(), m_monitor->render->renderHeight());
+    if (m_frameSize == QPoint() || m_frameSize.x() == 0 || m_frameSize.y() == 0) {
+        m_frameSize = QPoint(m_monitor->render->frameRenderWidth(), m_monitor->render->renderHeight());
+    }
     double factor = (double) m_monitor->render->frameRenderWidth() / m_frameSize.x() * m_monitor->render->sar();
     m_spinWidth->blockSignals(true);
     m_spinHeight->blockSignals(true);
@@ -736,7 +740,9 @@ void GeometryWidget::slotFitToWidth()
 
 void GeometryWidget::slotFitToHeight()
 {
-    if (m_frameSize == QPoint()) m_frameSize = QPoint(m_monitor->render->frameRenderWidth(), m_monitor->render->renderHeight());
+    if (m_frameSize == QPoint() || m_frameSize.x() == 0 || m_frameSize.y() == 0) {
+        m_frameSize = QPoint(m_monitor->render->frameRenderWidth(), m_monitor->render->renderHeight());
+    }
     double factor = (double) m_monitor->render->renderHeight() / m_frameSize.y();
     m_spinWidth->blockSignals(true);
     m_spinHeight->blockSignals(true);