From: Till Theato Date: Sat, 8 Jan 2011 22:11:14 +0000 (+0000) Subject: corners widget: fix on-monitor controls not showing up when effect is added X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=33d51597c3104adb45d9fa72eebf2577e84e681b;p=kdenlive corners widget: fix on-monitor controls not showing up when effect is added svn path=/trunk/kdenlive/; revision=5305 --- diff --git a/src/cornerswidget.cpp b/src/cornerswidget.cpp index f252b2c8..3368f0be 100644 --- a/src/cornerswidget.cpp +++ b/src/cornerswidget.cpp @@ -78,14 +78,24 @@ CornersWidget::~CornersWidget() m_monitor->slotEffectScene(false); } +void CornersWidget::addParameter(QDomElement e, int activeKeyframe) +{ + KeyframeEdit::addParameter(e, activeKeyframe); + + if (!m_item->polygon().count()) + slotUpdateItem(); +} + void CornersWidget::slotUpdateItem() { - QList points; + if (keyframe_list->columnCount() < 8) + return; QTableWidgetItem *item = keyframe_list->currentItem(); - if (!item || keyframe_list->columnCount() < 8) + if (!item) return; + QList points; double val; for (int col = 0; col < 8; col++) { if (!keyframe_list->item(item->row(), col)) @@ -124,9 +134,6 @@ void CornersWidget::slotUpdateProperties() } slotAdjustKeyframeInfo(false); - - if (changed) - emit parameterChanged(); } void CornersWidget::slotCheckMonitorPosition(int renderPos) diff --git a/src/cornerswidget.h b/src/cornerswidget.h index f4a02232..709d361f 100644 --- a/src/cornerswidget.h +++ b/src/cornerswidget.h @@ -44,6 +44,8 @@ public: CornersWidget(Monitor *monitor, QDomElement e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent = 0); virtual ~CornersWidget(); + virtual void addParameter(QDomElement e, int activeKeyframe = -1); + public slots: /** @brief Switches from normal monitor to monitor scene according to @param show. */ void slotShowScene(bool show = true); diff --git a/src/keyframeedit.h b/src/keyframeedit.h index 24377bc7..b6a0a681 100644 --- a/src/keyframeedit.h +++ b/src/keyframeedit.h @@ -83,7 +83,7 @@ class KeyframeEdit : public QWidget, public Ui::KeyframeEditor_UI public: explicit KeyframeEdit(QDomElement e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent = 0); virtual ~KeyframeEdit(); - void addParameter(QDomElement e, int activeKeyframe = -1); + virtual void addParameter(QDomElement e, int activeKeyframe = -1); const QString getValue(const QString &name); /** @brief Updates the timecode display according to settings (frame number or hh:mm:ss:ff) */ void updateTimecodeFormat(); diff --git a/src/widgets/cornerswidget_ui.ui b/src/widgets/cornerswidget_ui.ui index eff89d92..45933b2d 100644 --- a/src/widgets/cornerswidget_ui.ui +++ b/src/widgets/cornerswidget_ui.ui @@ -14,7 +14,7 @@ Form - + @@ -27,7 +27,7 @@ - + @@ -40,7 +40,7 @@ - + @@ -53,59 +53,59 @@ - + 1 - + - + - + - + - + - + - + - + - + 2 - + 3 - + 4 - + ... @@ -115,7 +115,7 @@ - + ... @@ -125,7 +125,7 @@ - + ... @@ -135,7 +135,7 @@ - + ... @@ -145,7 +145,7 @@ - + QFrame::NoFrame @@ -155,7 +155,7 @@ - + Qt::Vertical @@ -168,7 +168,7 @@ - + Qt::Horizontal @@ -181,7 +181,7 @@ - + Qt::Horizontal @@ -194,9 +194,12 @@ - + + + +