Make renaming markers undoable

This commit is contained in:
Thomas Wilshaw
2021-10-22 22:15:56 +01:00
parent 5c7073eab6
commit 87b66e0cbb
5 changed files with 53 additions and 1 deletions
+9
View File
@@ -22,6 +22,8 @@
#include "common/xmlutils.h"
#include "config/config.h"
#include "core.h"
#include "widget/marker/markerundo.h"
namespace olive {
@@ -55,6 +57,13 @@ void TimelineMarker::set_name(const QString &name)
emit NameChanged(name_);
}
void TimelineMarker::set_name_undo(QString name)
{
UndoCommand *command = new MarkerChangeNameCommand(Core::instance()->GetActiveProject(), this, name);
Core::instance()->undo_stack()->push(command);
}
int TimelineMarker::color()
{
return color_;