Commit 63cd99e1 authored by Nicolas Carion's avatar Nicolas Carion

Add helper function to push undo in core

parent c98552e4
......@@ -298,3 +298,8 @@ void Core::profileChanged()
void Core::pushUndo(const Fun &undo, const Fun &redo, const QString &text)
currentDoc()->commandStack()->push(new FunctionalUndoCommand(undo, redo, text));
......@@ -12,6 +12,7 @@ the Free Software Foundation, either version 3 of the License, or
#define CORE_H
#include "kdenlivecore_export.h"
#include "undohelper.hpp"
#include <QObject>
#include <QTabWidget>
#include <QUrl>
......@@ -113,6 +114,11 @@ public:
/** @brief This function must be called whenever the profile used changes */
void profileChanged();
/** @brief Create and push and undo object based on the corresponding functions
Note that if you class permits and requires it, you should use the macro PUSH_UNDO instead*/
void pushUndo(const Fun &undo, const Fun &redo, const QString &text);
explicit Core();
static std::unique_ptr<Core> m_self;
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