diff --git a/app/widget/keyframeview/keyframeview.cpp b/app/widget/keyframeview/keyframeview.cpp index fba3b6299..51ec2e724 100644 --- a/app/widget/keyframeview/keyframeview.cpp +++ b/app/widget/keyframeview/keyframeview.cpp @@ -53,13 +53,15 @@ KeyframeView::KeyframeView(QWidget *parent) : void KeyframeView::DeleteSelected() { - MultiUndoCommand* command = new MultiUndoCommand(); + if (!selection_manager_.IsDragging()) { + MultiUndoCommand* command = new MultiUndoCommand(); - foreach (NodeKeyframe *key, GetSelectedKeyframes()) { - command->add_child(new NodeParamRemoveKeyframeCommand(key)); + foreach (NodeKeyframe *key, GetSelectedKeyframes()) { + command->add_child(new NodeParamRemoveKeyframeCommand(key)); + } + + Core::instance()->undo_stack()->pushIfHasChildren(command); } - - Core::instance()->undo_stack()->pushIfHasChildren(command); } KeyframeView::NodeConnections KeyframeView::AddKeyframesOfNode(Node *n) diff --git a/app/widget/timeruler/seekablewidget.cpp b/app/widget/timeruler/seekablewidget.cpp index 6a647bb5c..e915375fd 100644 --- a/app/widget/timeruler/seekablewidget.cpp +++ b/app/widget/timeruler/seekablewidget.cpp @@ -90,13 +90,15 @@ void SeekableWidget::ConnectTimelinePoints(TimelinePoints *points) void SeekableWidget::DeleteSelected() { - MultiUndoCommand* command = new MultiUndoCommand(); + if (!selection_manager_.IsDragging()) { + MultiUndoCommand* command = new MultiUndoCommand(); - foreach (TimelineMarker *marker, selection_manager_.GetSelectedObjects()) { - command->add_child(new MarkerRemoveCommand(marker)); + foreach (TimelineMarker *marker, selection_manager_.GetSelectedObjects()) { + command->add_child(new MarkerRemoveCommand(marker)); + } + + Core::instance()->undo_stack()->pushIfHasChildren(command); } - - Core::instance()->undo_stack()->pushIfHasChildren(command); } bool SeekableWidget::CopySelected(bool cut)