Fix again extract with group in locked track

Ref: T1961
parent f113a2cd
This diff is collapsed.
......@@ -146,7 +146,7 @@ public:
*
* Makes sure no clip on track to lock is selected. */
void lockTrack(int ix, bool lock, bool requestUpdate = true);
void groupClips(bool group = true, QList<QGraphicsItem *> itemList = QList<QGraphicsItem *>(), bool forceLock = false, QUndoCommand *command = NULL);
void groupClips(bool group = true, QList<QGraphicsItem *> itemList = QList<QGraphicsItem *>(), bool forceLock = false, QUndoCommand *command = NULL, bool doIt = true);
void doGroupClips(QList <ItemInfo> clipInfos, QList <ItemInfo> transitionInfos, bool group);
void loadGroups(const QDomNodeList &groups);
......@@ -524,7 +524,7 @@ private:
/** @brief Send updtaed info to transition widget. */
void updateTransitionWidget(Transition *tr, ItemInfo info);
/** @brief Break groups containing an item in a locked track. */
void breakLockedGroups(int track, QList<ItemInfo> clipsToMove, QList<ItemInfo> transitionsToMove, QUndoCommand *masterCommand, bool doIt = true);
void breakLockedGroups(QList<ItemInfo> clipsToMove, QList<ItemInfo> transitionsToMove, QUndoCommand *masterCommand, bool doIt = true);
private slots:
void slotRefreshGuides();
......
......@@ -386,12 +386,13 @@ void EditTransitionCommand::redo()
m_doIt = true;
}
GroupClipsCommand::GroupClipsCommand(CustomTrackView *view, const QList <ItemInfo> &clipInfos, const QList <ItemInfo>& transitionInfos, bool group, QUndoCommand * parent) :
GroupClipsCommand::GroupClipsCommand(CustomTrackView *view, const QList <ItemInfo> &clipInfos, const QList <ItemInfo>& transitionInfos, bool group, bool doIt, QUndoCommand * parent) :
QUndoCommand(parent),
m_view(view),
m_clips(clipInfos),
m_transitions(transitionInfos),
m_group(group)
m_group(group),
m_doIt(doIt)
{
if (m_group)
setText(i18n("Group clips"));
......@@ -406,7 +407,9 @@ void GroupClipsCommand::undo()
// virtual
void GroupClipsCommand::redo()
{
m_view->doGroupClips(m_clips, m_transitions, m_group);
if (m_doIt)
m_view->doGroupClips(m_clips, m_transitions, m_group);
m_doIt = true;
}
InsertSpaceCommand::InsertSpaceCommand(CustomTrackView *view, const QList<ItemInfo> &clipsToMove, const QList<ItemInfo> &transToMove, int track, const GenTime &duration, bool doIt, QUndoCommand * parent) :
......
......@@ -207,7 +207,7 @@ private:
class GroupClipsCommand : public QUndoCommand
{
public:
GroupClipsCommand(CustomTrackView *view, const QList <ItemInfo> &clipInfos, const QList <ItemInfo> &transitionInfos, bool group, QUndoCommand * parent = 0);
GroupClipsCommand(CustomTrackView *view, const QList <ItemInfo> &clipInfos, const QList <ItemInfo> &transitionInfos, bool group, bool doIt = true, QUndoCommand * parent = 0);
void undo();
void redo();
......@@ -216,6 +216,7 @@ private:
const QList <ItemInfo> m_clips;
const QList <ItemInfo> m_transitions;
bool m_group;
bool m_doIt;
};
class InsertSpaceCommand : public QUndoCommand
......
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