[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdenlive/Applications/16.12] src: Fix Bin Effect reset
From: Jean-Baptiste Mardelle <null () kde ! org>
Date: 2017-03-04 11:27:07
Message-ID: E1ck7q7-0004x5-75 () code ! kde ! org
[Download RAW message or body]
Git commit d85742fcb1b62dcf1b0f4e03532072615499fca8 by Jean-Baptiste Mardelle.
Committed on 04/03/2017 at 11:27.
Pushed by mardelle into branch 'Applications/16.12'.
Fix Bin Effect reset
BUG: 376494
M +2 -2 src/bin/bin.cpp
M +1 -1 src/bin/bin.h
M +2 -2 src/bin/bincommands.cpp
M +1 -1 src/bin/bincommands.h
M +1 -1 src/effectstack/effectstackview2.cpp
M +1 -1 src/effectstack/effectstackview2.h
M +1 -1 src/mainwindow.cpp
https://commits.kde.org/kdenlive/d85742fcb1b62dcf1b0f4e03532072615499fca8
diff --git a/src/bin/bin.cpp b/src/bin/bin.cpp
index 918d2a4b4..3804ac26c 100644
--- a/src/bin/bin.cpp
+++ b/src/bin/bin.cpp
@@ -2361,11 +2361,11 @@ void Bin::slotEffectDropped(QString id, QDomElement effect)
m_doc->commandStack()->push(command);
}
-void Bin::slotUpdateEffect(QString id, QDomElement oldEffect, QDomElement newEffect, \
int ix) +void Bin::slotUpdateEffect(QString id, QDomElement oldEffect, QDomElement \
newEffect, int ix, bool refreshStack) {
if (id.isEmpty()) id = m_monitor->activeClipId();
if (id.isEmpty()) return;
- UpdateBinEffectCommand *command = new UpdateBinEffectCommand(this, id, \
oldEffect, newEffect, ix); + UpdateBinEffectCommand *command = new \
UpdateBinEffectCommand(this, id, oldEffect, newEffect, ix, refreshStack); \
m_doc->commandStack()->push(command); }
diff --git a/src/bin/bin.h b/src/bin/bin.h
index 32c68ff7b..f67012963 100644
--- a/src/bin/bin.h
+++ b/src/bin/bin.h
@@ -558,7 +558,7 @@ private slots:
void slotItemDropped(QStringList ids, const QModelIndex &parent);
void slotItemDropped(const QList<QUrl>&urls, const QModelIndex &parent);
void slotEffectDropped(QString effect, const QModelIndex &parent);
- void slotUpdateEffect(QString id, QDomElement oldEffect, QDomElement newEffect, \
int ix); + void slotUpdateEffect(QString id, QDomElement oldEffect, QDomElement \
newEffect, int ix, bool refreshStack = false);
void slotChangeEffectState(QString id, QList<int> indexes, bool disable);
void slotItemEdited(QModelIndex,QModelIndex,QVector<int>);
void slotAddUrl(QString url, int folderId, QMap <QString, QString> data = QMap \
<QString, QString>());
diff --git a/src/bin/bincommands.cpp b/src/bin/bincommands.cpp
index b6865f345..354b5b458 100644
--- a/src/bin/bincommands.cpp
+++ b/src/bin/bincommands.cpp
@@ -150,14 +150,14 @@ void RemoveBinEffectCommand::redo()
m_bin->removeEffect(m_clipId, m_effect);
}
-UpdateBinEffectCommand::UpdateBinEffectCommand(Bin *bin, const QString &clipId, \
QDomElement &oldEffect, QDomElement &newEffect, int ix, QUndoCommand *parent) : \
+UpdateBinEffectCommand::UpdateBinEffectCommand(Bin *bin, const QString &clipId, \
QDomElement &oldEffect, QDomElement &newEffect, int ix, bool refreshStack, \
QUndoCommand *parent) : QUndoCommand(parent),
m_bin(bin),
m_clipId(clipId),
m_oldEffect(oldEffect),
m_newEffect(newEffect),
m_ix(ix),
- m_refreshStack(false)
+ m_refreshStack(refreshStack)
{
setText(i18n("Edit Bin Effect"));
}
diff --git a/src/bin/bincommands.h b/src/bin/bincommands.h
index 6d576984f..799cb21f7 100644
--- a/src/bin/bincommands.h
+++ b/src/bin/bincommands.h
@@ -109,7 +109,7 @@ private:
class UpdateBinEffectCommand : public QUndoCommand
{
public:
- explicit UpdateBinEffectCommand(Bin *bin, const QString &clipId, QDomElement \
&oldEffect, QDomElement &newEffect, int ix, QUndoCommand *parent = 0); + explicit \
UpdateBinEffectCommand(Bin *bin, const QString &clipId, QDomElement &oldEffect, \
QDomElement &newEffect, int ix, bool refreshStack, QUndoCommand *parent = 0); void \
undo(); void redo();
private:
diff --git a/src/effectstack/effectstackview2.cpp \
b/src/effectstack/effectstackview2.cpp index b2c0f066c..4835d271d 100644
--- a/src/effectstack/effectstackview2.cpp
+++ b/src/effectstack/effectstackview2.cpp
@@ -929,7 +929,7 @@ void EffectStackView2::slotResetEffect(int ix)
emit updateEffect(m_clipref, -1, old, dom, ix,true);
} else if (m_status == MASTER_CLIP) {
m_masterclipref->initEffect(m_effectMetaInfo.monitor->profileInfo(), \
dom);
- emit updateMasterEffect(m_masterclipref->clipId(), old, dom, ix);
+ emit updateMasterEffect(m_masterclipref->clipId(), old, dom, ix,true);
}
}
diff --git a/src/effectstack/effectstackview2.h b/src/effectstack/effectstackview2.h
index 9b9761965..fc290f19d 100644
--- a/src/effectstack/effectstackview2.h
+++ b/src/effectstack/effectstackview2.h
@@ -266,7 +266,7 @@ signals:
/** Parameters for an effect changed, update the filter in timeline */
void updateEffect(ClipItem*, int, const QDomElement&, const QDomElement &, \
int,bool);
/** Parameters for an effect changed, update the filter in timeline */
- void updateMasterEffect(QString, const QDomElement&, const QDomElement &, int);
+ void updateMasterEffect(QString, const QDomElement&, const QDomElement &, int \
ix,bool refreshStack = false); /** An effect in stack was moved, we need to \
regenerate all effects for this clip in the playlist */
void refreshEffectStack(ClipItem *);
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index d16df70dd..005e81ffa 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -332,7 +332,7 @@ MainWindow::MainWindow(const QString &MltPath, const QUrl &Url, \
const QString &
connect(pCore->bin(), SIGNAL(masterClipSelected(ClipController *, Monitor *)), \
m_effectStack, SLOT(slotMasterClipItemSelected(ClipController *, \
Monitor *)));
connect(pCore->bin(), SIGNAL(masterClipUpdated(ClipController *, Monitor *)), \
m_effectStack, SLOT(slotRefreshMasterClipEffects(ClipController *, \
Monitor *)));
connect(m_effectStack, SIGNAL(addMasterEffect(QString,QDomElement)), \
pCore->bin(), SLOT(slotEffectDropped(QString,QDomElement)));
- connect(m_effectStack, \
SIGNAL(updateMasterEffect(QString,QDomElement,QDomElement,int)), pCore->bin(), \
SLOT(slotUpdateEffect(QString,QDomElement,QDomElement,int))); + \
connect(m_effectStack, \
SIGNAL(updateMasterEffect(QString,QDomElement,QDomElement,int,bool)), pCore->bin(), \
SLOT(slotUpdateEffect(QString,QDomElement,QDomElement,int,bool)));
connect(m_effectStack, SIGNAL(changeMasterEffectState(QString,QList<int>,bool)), \
pCore->bin(), SLOT(slotChangeEffectState(QString,QList<int>,bool)));
connect(m_effectStack, SIGNAL(removeMasterEffect(QString,QDomElement)), \
pCore->bin(), SLOT(slotDeleteEffect(QString,QDomElement)));
connect(m_effectStack, SIGNAL(changeEffectPosition(QString,const QList \
<int>,int)), pCore->bin(), SLOT(slotMoveEffect(QString,const QList <int>,int)));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic