X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Faddfoldercommand.cpp;h=b5146d96419243f6b460f1069d4a713c5132fe1a;hb=67076281e0f9d0907216bbec1b46c9f849dcec8c;hp=3d7d98a343e92238ad7c8d559e02c0b5e8a0590b;hpb=49bda928236824dd6b0b350ab0d1468b2af28f67;p=kdenlive diff --git a/src/addfoldercommand.cpp b/src/addfoldercommand.cpp index 3d7d98a3..b5146d96 100644 --- a/src/addfoldercommand.cpp +++ b/src/addfoldercommand.cpp @@ -17,23 +17,32 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ -#include #include "addfoldercommand.h" #include "projectlist.h" -AddFolderCommand::AddFolderCommand(ProjectList *view, const QString folderName, const QString &clipId, bool doIt, QUndoCommand *parent) : QUndoCommand(parent), m_view(view), m_name(folderName), m_id(clipId), m_doIt(doIt) { +#include + +AddFolderCommand::AddFolderCommand(ProjectList *view, const QString folderName, const QString &clipId, bool doIt, QUndoCommand *parent) : + QUndoCommand(parent), + m_view(view), + m_name(folderName), + m_id(clipId), + m_doIt(doIt) +{ if (doIt) setText(i18n("Add folder")); else setText(i18n("Delete folder")); } // virtual -void AddFolderCommand::undo() { +void AddFolderCommand::undo() +{ if (m_doIt) m_view->slotAddFolder(m_name, m_id, true); else m_view->slotAddFolder(m_name, m_id, false); } // virtual -void AddFolderCommand::redo() { +void AddFolderCommand::redo() +{ if (m_doIt) m_view->slotAddFolder(m_name, m_id, false); else m_view->slotAddFolder(m_name, m_id, true); }