name every undo command

This commit is contained in:
itsmattkc
2023-03-12 00:49:03 -08:00
parent 019f095ee4
commit 2c2df99963
46 changed files with 172 additions and 122 deletions
+4 -4
View File
@@ -61,7 +61,7 @@ void KeyframeView::DeleteSelected()
command->add_child(new NodeParamRemoveKeyframeCommand(key));
}
Core::instance()->undo_stack()->push(command);
Core::instance()->undo_stack()->push(command, tr("Deleted %1 Keyframe(s)").arg(GetSelectedKeyframes().size()));
}
}
@@ -247,7 +247,7 @@ bool KeyframeView::Paste(std::function<Node *(const QString &)> find_node_functi
}
}
Core::instance()->undo_stack()->push(command);
Core::instance()->undo_stack()->push(command, tr("Pasted %1 Keyframe(s)").arg(keys.size()));
return true;
}
@@ -319,7 +319,7 @@ void KeyframeView::mouseReleaseEvent(QMouseEvent *event)
MultiUndoCommand* command = new MultiUndoCommand();
selection_manager_.DragStop(command);
KeyframeDragRelease(event, command);
Core::instance()->undo_stack()->push(command);
Core::instance()->undo_stack()->push(command, tr("Moved %1 Keyframe(s)").arg(selection_manager_.GetSelectedObjects().size()));
} else if (selection_manager_.IsRubberBanding()) {
selection_manager_.RubberBandStop();
Redraw();
@@ -612,7 +612,7 @@ void KeyframeView::ShowContextMenu()
foreach (NodeKeyframe* item, GetSelectedKeyframes()) {
command->add_child(new KeyframeSetTypeCommand(item, new_type));
}
Core::instance()->undo_stack()->push(command);
Core::instance()->undo_stack()->push(command, tr("Set Type of %1 Keyframe(s)").arg(GetSelectedKeyframes().size()));
}
}
}