Commit f43e6d01 authored by Till Theato's avatar Till Theato

Fix 'adjust to original size' and 'fit to width/height' for title and color...

Fix 'adjust to original size' and 'fit to width/height' for title and color clips in geometry widget.

svn path=/trunk/kdenlive/; revision=5827
parent 8b65d0e7
......@@ -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.
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment