aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2016-07-11 20:03:45 +0200
committerJean-Baptiste Mardelle <[email protected]>2016-07-11 20:03:45 +0200
commit289a51c34f72c475aa58e67cb18ef42bcbe656af (patch)
treef20d4e0d79556804413543794ac28aa5b5142c9a
parentad250f49f13aeebc4458229ba4acaa21bd14991d (diff)
Fix geometry effect centers not correctly updated in monitor when editing a value in spin box
-rw-r--r--src/effectstack/dragvalue.cpp5
-rw-r--r--src/effectstack/widgets/geometrywidget.cpp19
2 files changed, 14 insertions, 10 deletions
diff --git a/src/effectstack/dragvalue.cpp b/src/effectstack/dragvalue.cpp
index 050f580..aced50c 100644
--- a/src/effectstack/dragvalue.cpp
+++ b/src/effectstack/dragvalue.cpp
@@ -94,7 +94,6 @@ DragValue::DragValue(const QString &label, double defaultValue, int decimals, do
connect(m_doubleEdit, SIGNAL(valueChanged(double)), this, SLOT(slotSetValue(double)));
connect(m_doubleEdit, SIGNAL(editingFinished()), this, SLOT(slotEditingFinished()));
}
-
connect(m_label, SIGNAL(valueChanged(double,bool)), this, SLOT(setValueFromProgress(double,bool)));
connect(m_label, SIGNAL(resetValue()), this, SLOT(slotReset()));
setLayout(l);
@@ -116,11 +115,11 @@ DragValue::DragValue(const QString &label, double defaultValue, int decimals, do
m_directUpdate->setCheckable(true);
m_directUpdate->setChecked(KdenliveSettings::dragvalue_directupdate());
m_menu->addAction(m_directUpdate);
-
+
QAction *reset = new QAction(KoIconUtils::themedIcon(QStringLiteral("edit-undo")), i18n("Reset value"), this);
connect(reset, SIGNAL(triggered()), this, SLOT(slotReset()));
m_menu->addAction(reset);
-
+
if (m_id > -1) {
QAction *timeline = new QAction(KoIconUtils::themedIcon(QStringLiteral("go-jump")), i18n("Show %1 in timeline", label), this);
connect(timeline, SIGNAL(triggered()), this, SLOT(slotSetInTimeline()));
diff --git a/src/effectstack/widgets/geometrywidget.cpp b/src/effectstack/widgets/geometrywidget.cpp
index 82c61e6..37f9022 100644
--- a/src/effectstack/widgets/geometrywidget.cpp
+++ b/src/effectstack/widgets/geometrywidget.cpp
@@ -765,39 +765,44 @@ QVariantList GeometryWidget::calculateCenters()
void GeometryWidget::slotSetX(double value)
{
- m_monitor->setUpEffectGeometry(QRect(value, m_spinY->value(), m_spinWidth->value(), m_spinHeight->value()), calculateCenters());
+ m_monitor->setUpEffectGeometry(QRect(value, m_spinY->value(), m_spinWidth->value(), m_spinHeight->value()));
slotUpdateGeometry();
+ m_monitor->setUpEffectGeometry(QRect(), calculateCenters());
}
void GeometryWidget::slotSetY(double value)
{
- m_monitor->setUpEffectGeometry(QRect(m_spinX->value(), value, m_spinWidth->value(), m_spinHeight->value()), calculateCenters());
+ m_monitor->setUpEffectGeometry(QRect(m_spinX->value(), value, m_spinWidth->value(), m_spinHeight->value()));
slotUpdateGeometry();
+ m_monitor->setUpEffectGeometry(QRect(), calculateCenters());
}
void GeometryWidget::slotSetWidth(double value)
{
- m_monitor->setUpEffectGeometry(QRect(m_spinX->value(), m_spinY->value(), value, m_spinHeight->value()), calculateCenters());
+ m_monitor->setUpEffectGeometry(QRect(m_spinX->value(), m_spinY->value(), value, m_spinHeight->value()));
slotUpdateGeometry();
+ m_monitor->setUpEffectGeometry(QRect(), calculateCenters());
}
void GeometryWidget::slotSetHeight(double value)
{
- m_monitor->setUpEffectGeometry(QRect(m_spinX->value(), m_spinY->value(), m_spinWidth->value(), value), calculateCenters());
+ m_monitor->setUpEffectGeometry(QRect(m_spinX->value(), m_spinY->value(), m_spinWidth->value(), value));
slotUpdateGeometry();
+ m_monitor->setUpEffectGeometry(QRect(), calculateCenters());
}
void GeometryWidget::updateMonitorGeometry()
{
- m_monitor->setUpEffectGeometry(QRect(m_spinX->value(), m_spinY->value(), m_spinWidth->value(), m_spinHeight->value()), calculateCenters());
+ m_monitor->setUpEffectGeometry(QRect(m_spinX->value(), m_spinY->value(), m_spinWidth->value(), m_spinHeight->value()));
slotUpdateGeometry();
+ m_monitor->setUpEffectGeometry(QRect(), calculateCenters());
}
-
void GeometryWidget::slotResize(double value)
{
- m_monitor->setUpEffectGeometry(QRect(m_spinX->value(), m_spinY->value(), (int)((m_monitor->render->frameRenderWidth() * value / 100.0) + 0.5), (int)((m_monitor->render->renderHeight() * value / 100.0) + 0.5)), calculateCenters());
+ m_monitor->setUpEffectGeometry(QRect(m_spinX->value(), m_spinY->value(), (int)((m_monitor->render->frameRenderWidth() * value / 100.0) + 0.5), (int)((m_monitor->render->renderHeight() * value / 100.0) + 0.5)));
slotUpdateGeometry();
+ m_monitor->setUpEffectGeometry(QRect(), calculateCenters());
}