Fix geometry effect centers not correctly updated in monitor when editing a value in spin box

parent ad250f49
......@@ -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()));
......
......@@ -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());
}
......
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