emit mousePosition(mappedXPos);
if (event->buttons() & Qt::MidButton) return;
- if (dragMode() == QGraphicsView::RubberBandDrag || (event->modifiers() == Qt::ControlModifier && m_tool != SPACERTOOL)) {
+ if (dragMode() == QGraphicsView::RubberBandDrag || (event->modifiers() == Qt::ControlModifier && m_tool != SPACERTOOL && m_operationMode != RESIZESTART && m_operationMode != RESIZEEND)) {
event->setAccepted(true);
m_moveOpMode = NONE;
QGraphicsView::mouseMoveEvent(event);
}
} else if (m_operationMode == RESIZESTART && move) {
m_document->renderer()->pause();
- if (m_dragItem->type() == AVWIDGET && m_dragItem->parentItem() && m_dragItem->parentItem() != m_selectionGroup) {
+ if (event->modifiers() != Qt::ControlModifier && m_dragItem->type() == AVWIDGET && m_dragItem->parentItem() && m_dragItem->parentItem() != m_selectionGroup) {
AbstractGroupItem *parent = static_cast <AbstractGroupItem *>(m_dragItem->parentItem());
if (parent)
parent->resizeStart((int)(snappedPos) - m_dragItemInfo.startPos.frames(m_document->fps()));
}
} else if (m_operationMode == RESIZEEND && move) {
m_document->renderer()->pause();
- if (m_dragItem->type() == AVWIDGET && m_dragItem->parentItem() && m_dragItem->parentItem() != m_selectionGroup) {
+ if (event->modifiers() != Qt::ControlModifier && m_dragItem->type() == AVWIDGET && m_dragItem->parentItem() && m_dragItem->parentItem() != m_selectionGroup) {
AbstractGroupItem *parent = static_cast <AbstractGroupItem *>(m_dragItem->parentItem());
if (parent)
parent->resizeEnd((int)(snappedPos) - m_dragItemInfo.endPos.frames(m_document->fps()));
m_document->renderer()->doRefresh();
} else if (m_operationMode == RESIZESTART && m_dragItem->startPos() != m_dragItemInfo.startPos) {
// resize start
- if (m_dragItem->type() == AVWIDGET && m_dragItem->parentItem() && m_dragItem->parentItem() != m_selectionGroup) {
+ if (event->modifiers() != Qt::ControlModifier && m_dragItem->type() == AVWIDGET && m_dragItem->parentItem() && m_dragItem->parentItem() != m_selectionGroup) {
AbstractGroupItem *parent = static_cast <AbstractGroupItem *>(m_dragItem->parentItem());
if (parent) {
QUndoCommand *resizeCommand = new QUndoCommand();
}
} else if (m_operationMode == RESIZEEND && m_dragItem->endPos() != m_dragItemInfo.endPos) {
// resize end
- if (m_dragItem->type() == AVWIDGET && m_dragItem->parentItem() && m_dragItem->parentItem() != m_selectionGroup) {
+ if (event->modifiers() != Qt::ControlModifier && m_dragItem->type() == AVWIDGET && m_dragItem->parentItem() && m_dragItem->parentItem() != m_selectionGroup) {
AbstractGroupItem *parent = static_cast <AbstractGroupItem *>(m_dragItem->parentItem());
if (parent) {
QUndoCommand *resizeCommand = new QUndoCommand();
KdenliveSettings::setSnaptopoints(snap);
}
+ bool hasParentCommand = false;
+ if (command) {
+ hasParentCommand = true;
+ } else {
+ command = new QUndoCommand();
+ command->setText(i18n("Resize clip start"));
+ }
+
// do this here, too, because otherwise undo won't update the group
if (item->parentItem() && item->parentItem() != m_selectionGroup)
new RebuildGroupCommand(this, item->info().track, item->endPos() - GenTime(1, m_document->fps()), command);
resizeinfo.track = m_document->tracksCount() - resizeinfo.track;
bool success = m_document->renderer()->mltResizeClipStart(resizeinfo, item->startPos() - oldInfo.startPos);
if (success) {
- bool hasParentCommand = false;
- if (command) {
- hasParentCommand = true;
- } else {
- command = new QUndoCommand();
- command->setText(i18n("Resize clip start"));
- }
-
// Check if there is an automatic transition on that clip (lower track)
Transition *transition = getTransitionItemAtStart(oldInfo.startPos, oldInfo.track);
if (transition && transition->isAutomatic()) {
} else {
new ResizeClipCommand(this, oldInfo, info, false, false, command);
}
-
- if (!hasParentCommand)
- m_commandStack->push(command);
} else {
KdenliveSettings::setSnaptopoints(false);
item->resizeStart((int) oldInfo.startPos.frames(m_document->fps()));
}
if (item->parentItem() && item->parentItem() != m_selectionGroup)
new RebuildGroupCommand(this, item->info().track, item->endPos() - GenTime(1, m_document->fps()), command);
+
+ if (!hasParentCommand)
+ m_commandStack->push(command);
}
void CustomTrackView::prepareResizeClipEnd(AbstractClipItem* item, ItemInfo oldInfo, int pos, bool check, QUndoCommand *command)
KdenliveSettings::setSnaptopoints(snap);
}
+ bool hasParentCommand = false;
+ if (command) {
+ hasParentCommand = true;
+ } else {
+ command = new QUndoCommand();
+ command->setText(i18n("Resize clip end"));
+ }
+
// do this here, too, because otherwise undo won't update the group
if (item->parentItem() && item->parentItem() != m_selectionGroup)
new RebuildGroupCommand(this, item->info().track, item->startPos(), command);
resizeinfo.track = m_document->tracksCount() - resizeinfo.track;
bool success = m_document->renderer()->mltResizeClipEnd(resizeinfo, resizeinfo.endPos - resizeinfo.startPos);
if (success) {
- bool hasParentCommand = false;
- if (command) {
- hasParentCommand = true;
- } else {
- command = new QUndoCommand();
- command->setText(i18n("Resize clip end"));
- }
-
// Check if there is an automatic transition on that clip (lower track)
Transition *tr = getTransitionItemAtEnd(oldInfo.endPos, oldInfo.track);
if (tr && tr->isAutomatic()) {
new ResizeClipCommand(this, oldInfo, info, false, false, command);
}
- if (!hasParentCommand)
- m_commandStack->push(command);
updatePositionEffects(clip, oldInfo);
} else {
KdenliveSettings::setSnaptopoints(false);
}
if (item->parentItem() && item->parentItem() != m_selectionGroup)
new RebuildGroupCommand(this, item->info().track, item->startPos(), command);
+
+ if (!hasParentCommand)
+ m_commandStack->push(command);
}
void CustomTrackView::updatePositionEffects(ClipItem * item, ItemInfo info)