[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdenlive] src: Several small improvements to keyframe animation widget, make timecode always use fi
From:       Jean-Baptiste Mardelle <jb () kdenlive ! org>
Date:       2016-01-31 21:14:19
Message-ID: E1aPzK7-0007NQ-L2 () scm ! kde ! org
[Download RAW message or body]

Git commit 84f70411fda62a4f38553d4d3a7192b66481d130 by Jean-Baptiste Mardelle.
Committed on 31/01/2016 at 21:14.
Pushed by mardelle into branch 'master'.

Several small improvements to keyframe animation widget, make timecode always use \
fixed font, fix effect not updated when clip duration changed

M  +10   -12   src/effectstack/animkeyframeruler.cpp
M  +6    -2    src/effectstack/animkeyframeruler.h
M  +1    -1    src/effectstack/collapsibleeffect.cpp
M  +1    -1    src/effectstack/effectstackview2.cpp
M  +78   -15   src/effectstack/widgets/animationwidget.cpp
M  +5    -2    src/effectstack/widgets/animationwidget.h
M  +1    -1    src/effectstack/widgets/doubleparameterwidget.cpp
M  +0    -1    src/monitor/monitor.cpp
M  +12   -15   src/timecodedisplay.cpp
M  +0    -1    src/timecodedisplay.h
M  +8    -0    src/timeline/customtrackview.cpp

http://commits.kde.org/kdenlive/84f70411fda62a4f38553d4d3a7192b66481d130

diff --git a/src/effectstack/animkeyframeruler.cpp \
b/src/effectstack/animkeyframeruler.cpp index 6784126..f4b9af7 100644
--- a/src/effectstack/animkeyframeruler.cpp
+++ b/src/effectstack/animkeyframeruler.cpp
@@ -55,14 +55,15 @@ AnimKeyframeRuler::AnimKeyframeRuler(int min, int max, QWidget \
*parent) :  setMinimumHeight(m_size);
     setMaximumHeight(m_size);
     KColorScheme scheme(p.currentColorGroup(), KColorScheme::Window, \
                KSharedConfig::openConfig(KdenliveSettings::colortheme()));
-    m_selected = scheme.decoration(KColorScheme::HoverColor).color();
+    m_selected = palette().highlight().color();
     m_keyframe = scheme.foreground(KColorScheme::LinkText).color();
 }
 
-void AnimKeyframeRuler::updateKeyframes(QVector<int> keyframes, QVector<int> types)
+void AnimKeyframeRuler::updateKeyframes(QVector<int> keyframes, QVector<int> types, \
QVector<int> relativeTypes)  {
     m_keyframes = keyframes;
     m_keyframeTypes = types;
+    m_keyframeRelatives = relativeTypes;
     update();
 }
 
@@ -78,7 +79,6 @@ void AnimKeyframeRuler::mousePressEvent(QMouseEvent * event)
     int headOffset = m_lineHeight / 1.5;
     if (event->y() < m_lineHeight) {
         // check if we want to move a keyframe
-        int mousePos = qMax((int)(xPos / m_scale), 0);
         for (int i = 0; i < m_keyframes.count(); i++) {
             int kfrPos = m_keyframes.at(i);
             if (kfrPos * m_scale - xPos > headOffset) break;
@@ -108,13 +108,13 @@ void AnimKeyframeRuler::leaveEvent( QEvent * event )
     }
 }
 
+
 // virtual
 void AnimKeyframeRuler::mouseMoveEvent(QMouseEvent * event)
 {
     int xPos = event->x() - margin;
     int headOffset = m_lineHeight / 1.5;
     if (event->buttons() == Qt::NoButton) {
-        int mousePos = qMax((int)(xPos / m_scale), 0);
         if (qAbs(m_position * m_scale - xPos) < m_lineHeight && event->y() >= \
m_lineHeight) {  // Mouse over time cursor
             if (m_hoverKeyframe != -2) {
@@ -197,7 +197,7 @@ void AnimKeyframeRuler::mouseReleaseEvent(QMouseEvent * event)
     setCursor(Qt::ArrowCursor);
     QWidget::mouseReleaseEvent(event);
     if (m_movingKeyframe) {
-        emit moveKeyframe(m_hoverKeyframe, m_movingKeyframePos);
+        emit moveKeyframe(m_keyframes.indexOf(m_hoverKeyframe), m_hoverKeyframe, \
m_movingKeyframePos);  } else if (!m_dragStart.isNull()) {
         // Seek to selected keyframe
         m_seekPosition = m_hoverKeyframe;
@@ -236,19 +236,17 @@ void AnimKeyframeRuler::paintEvent(QPaintEvent *e)
     m_scale = (double) (width() - 2 * margin) / frameLength;
     int headOffset = m_lineHeight / 1.5;
     QPolygon polygon;
+    p.setPen(palette().text().color());
     for (int i = 0; i < m_keyframes.count(); i++) {
             int pos  = m_keyframes.at(i);
-            int scaledPos = margin + pos * m_scale;
             // draw keyframes
             if (pos == m_position || pos == m_hoverKeyframe) {
                 // active keyframe
                 p.setBrush(m_selected);
-                p.setPen(m_selected);
-            }
-            else {
-                p.setPen(palette().text().color());
-                p.setBrush(palette().text());
+            } else {
+                p.setBrush(m_keyframeRelatives.at(i) >= 0 ? palette().text() : \
Qt::yellow);  }
+            int scaledPos = margin + pos * m_scale;
             p.drawLine(scaledPos, headOffset, scaledPos, m_size);
             mlt_keyframe_type type = (mlt_keyframe_type) m_keyframeTypes.at(i);
             switch(type) {
@@ -290,7 +288,7 @@ void AnimKeyframeRuler::paintEvent(QPaintEvent *e)
     p.setPen(Qt::NoPen);
     // draw pointer
     if (m_seekPosition != SEEK_INACTIVE) {
-        p.fillRect(margin + m_seekPosition * m_scale - 1, 0, 3, height(), \
palette().dark()); +        p.fillRect(margin + m_seekPosition * m_scale - 1, 0, 3, \
height(), palette().linkVisited());  }
     QPolygon pa(3);
     const int cursor = margin + m_position * m_scale;
diff --git a/src/effectstack/animkeyframeruler.h \
b/src/effectstack/animkeyframeruler.h index f2c90bf..2f1c8f6 100644
--- a/src/effectstack/animkeyframeruler.h
+++ b/src/effectstack/animkeyframeruler.h
@@ -36,7 +36,7 @@ public:
     explicit AnimKeyframeRuler(int min, int max, QWidget *parent = 0);
     int value() const;
     int frameLength;
-    void updateKeyframes(QVector<int> keyframes, QVector<int> types);
+    void updateKeyframes(QVector<int> keyframes, QVector<int> types, QVector<int> \
relativeTypes);  
 protected:
     void paintEvent(QPaintEvent * /*e*/);
@@ -48,8 +48,12 @@ protected:
     void leaveEvent( QEvent * event );
 
 private:
+    /** @brief Holds a list of frame positions for the keyframes. */
     QVector <int> m_keyframes;
+    /** @brief Holds the keyframe type (linear, discrete, smooth) for each \
keyframes. */  QVector <int> m_keyframeTypes;
+    /** @brief Holds the keyframe relativity (relative to start, to end, percent) \
for each keyframes. */ +    QVector <int> m_keyframeRelatives;
     int m_position;
     int m_size;
     double m_scale;
@@ -71,7 +75,7 @@ signals:
     void keyframeMoved(int);
     void addKeyframe(int);
     void removeKeyframe(int);
-    void moveKeyframe(int, int);
+    void moveKeyframe(int, int, int);
 };
 
 #endif
diff --git a/src/effectstack/collapsibleeffect.cpp \
b/src/effectstack/collapsibleeffect.cpp index da9dba9..682be87 100644
--- a/src/effectstack/collapsibleeffect.cpp
+++ b/src/effectstack/collapsibleeffect.cpp
@@ -59,7 +59,7 @@ CollapsibleEffect::CollapsibleEffect(const QDomElement &effect, \
const QDomElemen  }
     filterWheelEvent = true;
     m_info.fromString(effect.attribute(QStringLiteral("kdenlive_info")));
-    setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
+    //setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
     buttonUp->setIcon(KoIconUtils::themedIcon(QStringLiteral("kdenlive-up")));
     buttonUp->setToolTip(i18n("Move effect up"));
     buttonDown->setIcon(KoIconUtils::themedIcon(QStringLiteral("kdenlive-down")));
diff --git a/src/effectstack/effectstackview2.cpp \
b/src/effectstack/effectstackview2.cpp index 01ba06e..9a00033 100644
--- a/src/effectstack/effectstackview2.cpp
+++ b/src/effectstack/effectstackview2.cpp
@@ -68,7 +68,7 @@ EffectStackView2::EffectStackView2(Monitor *projectMonitor, QWidget \
*parent) :  m_layout.addWidget(m_effect);
     m_layout.addWidget(m_transition);
     m_transition->setHidden(true);
-    setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
+    //setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
     setEnabled(false);
     setStyleSheet(getStyleSheet());
 }
diff --git a/src/effectstack/widgets/animationwidget.cpp \
b/src/effectstack/widgets/animationwidget.cpp index e98b970..c1354a4 100644
--- a/src/effectstack/widgets/animationwidget.cpp
+++ b/src/effectstack/widgets/animationwidget.cpp
@@ -43,17 +43,27 @@
 AnimationWidget::AnimationWidget(EffectMetaInfo *info, int clipPos, int min, int \
max, QDomElement xml, int activeKeyframe, QWidget *parent) :  QWidget(parent)
     , m_monitor(info->monitor)
-    , m_timePos(new TimecodeDisplay(info->monitor->timecode()))
+    , m_timePos(new TimecodeDisplay(info->monitor->timecode(), this))
     , m_clipPos(clipPos)
     , m_inPoint(min)
     , m_outPoint(max)
     , m_factor(1)
 {
     // Anim properties might at some point require some more infos like profile
-    m_animProperties.set("anim", xml.hasAttribute(QStringLiteral("value")) ? \
xml.attribute(QStringLiteral("value")).toUtf8().constData() : \
xml.attribute(QStringLiteral("default")).toUtf8().constData()); +    QString \
keyframes = xml.hasAttribute(QStringLiteral("value")) ? \
xml.attribute(QStringLiteral("value")) : xml.attribute(QStringLiteral("default")); +  \
m_animProperties.set("anim", keyframes.toUtf8().constData());  // Required to \
initialize anim property  m_animProperties.anim_get_int("anim", 0);
     m_animController = m_animProperties.get_anim("anim");
+
+    // MLT doesnt give us info if keyframe is relative to end, so manually parse
+    QStringList keys = keyframes.split(";");
+    foreach(const QString& key, keys) {
+        // TODO % keyframes
+        if (key.contains("-")) m_keyframeRelatives << -1;
+        else m_keyframeRelatives << 1;
+    }
+
     QVBoxLayout* vbox2 = new QVBoxLayout(this);
 
     // Keyframe ruler
@@ -62,7 +72,7 @@ AnimationWidget::AnimationWidget(EffectMetaInfo *info, int clipPos, \
                int min, int
     connect(m_ruler, &AnimKeyframeRuler::removeKeyframe, this, \
&AnimationWidget::slotDeleteKeyframe);  vbox2->addWidget(m_ruler);
     vbox2->setContentsMargins(0, 0, 0, 0);
-    QToolBar *tb = new QToolBar;
+    QToolBar *tb = new QToolBar(this);
     vbox2->addWidget(tb);
     setLayout(vbox2);
     connect(m_ruler, &AnimKeyframeRuler::requestSeek, this, \
&AnimationWidget::seekToPos); @@ -83,7 +93,7 @@ \
                AnimationWidget::AnimationWidget(EffectMetaInfo *info, int clipPos, \
                int min, int
     tb->addAction(KoIconUtils::themedIcon(QStringLiteral("media-skip-forward")), \
i18n("Next keyframe"), this, SLOT(slotNext()));  
     // Keyframe type widget
-    m_selectType = new KSelectAction(i18n("Keyframe interpolation"), this);
+    m_selectType = new \
KSelectAction(KoIconUtils::themedIcon(QStringLiteral("kdenlive-menu")), \
i18n("Keyframe interpolation"), this);  QAction *discrete = new \
QAction(i18n("Discrete"), this);  discrete->setData((int) mlt_keyframe_discrete);
     discrete->setCheckable(true);
@@ -98,13 +108,15 @@ AnimationWidget::AnimationWidget(EffectMetaInfo *info, int \
clipPos, int min, int  m_selectType->addAction(curve);
     m_selectType->setCurrentAction(linear);
     connect(m_selectType, SIGNAL(triggered(QAction*)), this, \
SLOT(slotEditKeyframeType(QAction*))); +    \
m_selectType->setToolBarMode(KSelectAction::MenuMode);  
-    m_relativeToEnd = new QAction(i18n("Relative to end"), this);
-    m_relativeToEnd->setCheckable(true);
+    m_reverseKeyframe = new QAction(i18n("Relative to end"), this);
+    m_reverseKeyframe->setCheckable(true);
+    connect(m_reverseKeyframe, &QAction::toggled, this, \
&AnimationWidget::slotReverseKeyframeType);  
     QMenu *container = new QMenu;
     container->addAction(m_selectType);
-    container->addAction(m_relativeToEnd);
+    //container->addAction(m_reverseKeyframe);
 
     QToolButton *menuButton = new QToolButton;
     menuButton->setIcon(KoIconUtils::themedIcon(QStringLiteral("kdenlive-menu")));
@@ -120,6 +132,7 @@ AnimationWidget::AnimationWidget(EffectMetaInfo *info, int \
clipPos, int min, int  
     // Timecode
     tb->addWidget(m_timePos);
+    m_timePos->setFrame(false);
     m_timePos->setRange(0, m_outPoint - m_inPoint);
 
     // Display keyframe parameter
@@ -129,7 +142,10 @@ AnimationWidget::AnimationWidget(EffectMetaInfo *info, int \
clipPos, int min, int  rebuildKeyframes();
 }
 
-
+AnimationWidget::~AnimationWidget()
+{
+    delete m_animController;
+}
 
 void AnimationWidget::updateTimecodeFormat()
 {
@@ -155,11 +171,17 @@ void AnimationWidget::slotNext()
 void AnimationWidget::slotAddKeyframe(int pos)
 {
     double val = m_animProperties.anim_get_double("anim", pos, \
                m_timePos->maximum());
-    // Get current keyframe type
+    // Add current keyframe type
     m_animProperties.anim_set("anim", val, pos, m_timePos->maximum(), \
(mlt_keyframe_type) m_selectType->currentAction()->data().toInt()); +    // update \
relativity index +    for (int i = 0; i < m_animController->key_count(); i++) {
+        if (m_animController->key_get_frame(i) == pos) {
+            m_keyframeRelatives.insert(i,  m_reverseKeyframe->isChecked() ? -1 : 1);
+            break;
+        }
+    }
     rebuildKeyframes();
     m_selectType->setEnabled(true);
-    m_relativeToEnd->setEnabled(true);
     m_addKeyframe->setActive(true);
     DoubleParameterWidget *slider = m_doubleWidgets.at(0);
     slider->setEnabled(true);
@@ -168,10 +190,16 @@ void AnimationWidget::slotAddKeyframe(int pos)
 
 void AnimationWidget::slotDeleteKeyframe(int pos)
 {
+    // update relativity index
+    for (int i = 0; i < m_animController->key_count(); i++) {
+        if (m_animController->key_get_frame(i) == pos) {
+            m_keyframeRelatives.removeAt(i);
+            break;
+        }
+    }
     m_animController->remove(pos);
     rebuildKeyframes();
     m_selectType->setEnabled(false);
-    m_relativeToEnd->setEnabled(false);
     m_addKeyframe->setActive(false);
     DoubleParameterWidget *slider = m_doubleWidgets.at(0);
     slider->setEnabled(false);
@@ -203,13 +231,17 @@ void AnimationWidget::slotSyncPosition(int relTimelinePos)
     }
 }
 
-void AnimationWidget::moveKeyframe(int oldPos, int newPos)
+void AnimationWidget::moveKeyframe(int index, int oldPos, int newPos)
 {
     bool isKey;
     mlt_keyframe_type type;
     if (!m_animController->get_item(oldPos, isKey, type)) {
         double val = m_animProperties.anim_get_double("anim", oldPos, \
m_timePos->maximum());  m_animController->remove(oldPos);
+        if (m_keyframeRelatives.at(index) < 0) {
+            // keyframe relative to end
+            newPos -= m_timePos->maximum();
+        }
         m_animProperties.anim_set("anim", val, newPos, m_timePos->maximum(), type);
         rebuildKeyframes();
         updateToolbar();
@@ -222,6 +254,7 @@ void AnimationWidget::rebuildKeyframes()
     // Fetch keyframes
     QVector <int> keyframes;
     QVector <int> types;
+    QVector <int> relativeType;
     int frame;
     mlt_keyframe_type type;
     for (int i = 0; i < m_animController->key_count(); i++) {
@@ -230,7 +263,7 @@ void AnimationWidget::rebuildKeyframes()
             types << (int) type;
         }
     }
-    m_ruler->updateKeyframes(keyframes, types);
+    m_ruler->updateKeyframes(keyframes, types, m_keyframeRelatives);
 }
 
 void AnimationWidget::updateToolbar()
@@ -284,6 +317,12 @@ void AnimationWidget::slotPositionChanged(int pos, bool seek)
         m_monitor->setEffectKeyframe(true);
         m_addKeyframe->setActive(true);
         m_selectType->setEnabled(true);
+        // update relativity action
+        for (int i = 0; i < m_animController->key_count(); i++) {
+            if (m_animController->key_get_frame(i) == pos) {
+                m_reverseKeyframe->setChecked(m_keyframeRelatives.at(i) < 0);
+            }
+        }
         QList<QAction *> types = m_selectType->actions();
         for (int i = 0; i < types.count(); i++) {
             if (types.at(i)->data().toInt() == (int) \
m_animController->keyframe_type(pos)) { @@ -354,6 +393,30 @@ void \
AnimationWidget::slotAdjustKeyframeValue(double value)  QString \
AnimationWidget::getAnimation()  {
     m_animController->interpolate();
-    QString result = m_animController->serialize_cut(0, m_timePos->maximum());
-    return result;
+    QString result = m_animController->serialize_cut(-1, -1);
+    QStringList keys = result.split(";");
+    for (int i = 0; i < keys.count(); i++) {
+        if (m_keyframeRelatives.at(i) < 0) {
+            int pos = keys.at(i).section("=", 0, 0).toInt();
+            // keyframe relative to end
+            pos -= m_timePos->maximum();
+            keys[i] = QString::number(pos) + "=" + keys.at(i).section("=", 1);
+        }
+    }
+    return keys.join(";");
+}
+
+void AnimationWidget::slotReverseKeyframeType(bool reverse)
+{
+    int pos = m_timePos->getValue();
+    if (m_animController->is_key(pos)) {
+        for (int i = 0; i < m_animController->key_count(); i++) {
+            if (m_animController->key_get_frame(i) == pos) {
+                m_keyframeRelatives[i] = reverse ? -1 : 1;
+                break;
+            }
+        }
+        rebuildKeyframes();
+        emit parameterChanged();
+    }
 }
diff --git a/src/effectstack/widgets/animationwidget.h \
b/src/effectstack/widgets/animationwidget.h index 7fecc44..9ede8a5 100644
--- a/src/effectstack/widgets/animationwidget.h
+++ b/src/effectstack/widgets/animationwidget.h
@@ -43,6 +43,7 @@ class AnimationWidget : public QWidget
     Q_OBJECT
 public:
     explicit AnimationWidget(EffectMetaInfo *info, int clipPos, int min, int max, \
QDomElement xml, int activeKeyframe, QWidget *parent = 0); +    virtual \
~AnimationWidget();  void updateTimecodeFormat();
     void addParameter(const QDomElement &e, int activeKeyframe);
     QString getAnimation();
@@ -59,9 +60,10 @@ private:
     Mlt::Animation *m_animController;
     Mlt::Properties m_animProperties;
     KSelectAction *m_selectType;
-    QAction *m_relativeToEnd;
+    QAction *m_reverseKeyframe;
     QList <QDomElement> m_params;
     QList <DoubleParameterWidget *> m_doubleWidgets;
+    QVector <int> m_keyframeRelatives;
     void parseKeyframes();
     void rebuildKeyframes();
     void updateToolbar();
@@ -73,12 +75,13 @@ private slots:
     void slotPrevious();
     void slotNext();
     void slotAddDeleteKeyframe(bool add);
-    void moveKeyframe(int oldPos, int newPos);
+    void moveKeyframe(int index, int oldPos, int newPos);
     void slotEditKeyframeType(QAction *action);
     void slotAdjustKeyframeValue(double value);
     void slotPositionChanged(int pos = -1, bool seek = true);
     void slotAddKeyframe(int);
     void slotDeleteKeyframe(int);
+    void slotReverseKeyframeType(bool reverse);
 
 signals:
     void seekToPos(int);
diff --git a/src/effectstack/widgets/doubleparameterwidget.cpp \
b/src/effectstack/widgets/doubleparameterwidget.cpp index 0feed29..9f1c701 100644
--- a/src/effectstack/widgets/doubleparameterwidget.cpp
+++ b/src/effectstack/widgets/doubleparameterwidget.cpp
@@ -33,7 +33,7 @@ DoubleParameterWidget::DoubleParameterWidget(const QString &name, \
double value,  QGridLayout *layout = new QGridLayout(this);
     layout->setContentsMargins(0, 0, 0, 0);
     layout->setSpacing(0);
-    
+
     m_dragVal = new DragValue(name, defaultValue, decimals, min, max, id, suffix, \
true, this);  layout->addWidget(m_dragVal, 0, 1);
 
diff --git a/src/monitor/monitor.cpp b/src/monitor/monitor.cpp
index e54f1a1..4edfa6b 100644
--- a/src/monitor/monitor.cpp
+++ b/src/monitor/monitor.cpp
@@ -1662,7 +1662,6 @@ void Monitor::setPalette ( const QPalette & p)
         m->setIcon(newIcon);
     }
     if (m_ruler) m_ruler->updatePalette();
-    m_timePos->updatePalette(p);
     m_audioMeterWidget->refreshPixmap();
 }
 
diff --git a/src/timecodedisplay.cpp b/src/timecodedisplay.cpp
index aa0f8d3..99014b3 100644
--- a/src/timecodedisplay.cpp
+++ b/src/timecodedisplay.cpp
@@ -21,7 +21,9 @@
 #include "kdenlivesettings.h"
 
 #include <QMouseEvent>
+#include <QLayout>
 #include <QLineEdit>
+#include <QStyle>
 #include <QFontDatabase>
 
 #include <KColorScheme>
@@ -34,29 +36,24 @@ TimecodeDisplay::TimecodeDisplay(const Timecode& t, QWidget \
*parent)  m_maximum(-1),
         m_value(0)
 {
-    lineEdit()->setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
 +    QFont ft = QFontDatabase::systemFont(QFontDatabase::FixedFont);
+    lineEdit()->setFont(ft);
+    setFont(ft);
     lineEdit()->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
-    QFontMetrics fm = lineEdit()->fontMetrics();
+    QFontMetrics fm(ft);
+    setFrame(false);
     QPalette palette;
-    palette.setColor(QPalette::Base, palette.window().color());
+    palette.setColor(QPalette::Base, Qt::transparent);//palette.window().color());
     setPalette(palette);
-    setMinimumWidth(fm.width(QStringLiteral("88:88:88:88888")) + \
                contentsMargins().right() + contentsMargins().right());
-    setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
-    setAccelerated(true);
-
+    setTimeCodeFormat(KdenliveSettings::frametimecode(), true);
     setValue(m_minimum);
+    setMinimumWidth(fm.width(QStringLiteral("88:88:88:88")) + \
contentsMargins().right() + contentsMargins().left() + frameSize().width() - \
lineEdit()->contentsRect().width() + QStyle::PM_SpinBoxFrameWidth + 6);  
-    setTimeCodeFormat(KdenliveSettings::frametimecode(), true);
+    setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Maximum);
+    setAccelerated(true);
     connect(lineEdit(), SIGNAL(editingFinished()), this, \
SLOT(slotEditingFinished()));  }
 
-void TimecodeDisplay::updatePalette(QPalette pal)
-{
-    QPalette p(pal);
-    p.setColor(QPalette::Base, p.window().color());
-    setPalette(p);
-}
-
 // virtual protected
 QAbstractSpinBox::StepEnabled TimecodeDisplay::stepEnabled () const
 {
diff --git a/src/timecodedisplay.h b/src/timecodedisplay.h
index e8af8e0..0776298 100644
--- a/src/timecodedisplay.h
+++ b/src/timecodedisplay.h
@@ -100,7 +100,6 @@ public slots:
     /** @brief Sets value's format according to Kdenlive's settings.
     * @param t (optional, if already existing) Timecode object to use */
     void slotUpdateTimeCodeFormat();
-    void updatePalette(QPalette pal);
 
 private slots:
     void slotEditingFinished();
diff --git a/src/timeline/customtrackview.cpp b/src/timeline/customtrackview.cpp
index 99d4c96..9f047ab 100644
--- a/src/timeline/customtrackview.cpp
+++ b/src/timeline/customtrackview.cpp
@@ -5319,6 +5319,10 @@ void CustomTrackView::resizeClip(const ItemInfo &start, const \
ItemInfo &end, boo  }
     }
     m_document->renderer()->doRefresh();
+    if (item == m_dragItem) {
+        // clip is selected, update effect stack
+        emit clipItemSelected(item);
+    }
     KdenliveSettings::setSnaptopoints(snap);
 }
 
@@ -7764,6 +7768,10 @@ void CustomTrackView::adjustEffects(ClipItem* item, ItemInfo \
oldInfo, QUndoComma  ++i;
         }
     }
+    if (item == m_dragItem) {
+        // clip is selected, update effect stack
+        emit clipItemSelected(item);
+    }
 }
 
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic