X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Feditfoldercommand.cpp;h=6dbcd7fc95b343118c2a071d05f19dbaceee1ac4;hb=5aa1fc29e8870b49734af730895cd92a50a29a72;hp=93183c6f1ba49ba8b641fe8dea2f6f2728b2e97b;hpb=cd85961a9520f2f3c909e889dacd8de539468b89;p=kdenlive diff --git a/src/editfoldercommand.cpp b/src/editfoldercommand.cpp index 93183c6f..6dbcd7fc 100644 --- a/src/editfoldercommand.cpp +++ b/src/editfoldercommand.cpp @@ -23,16 +23,25 @@ #include -EditFolderCommand::EditFolderCommand(ProjectList *view, const QString newfolderName, const QString oldfolderName, const QString &clipId, bool doIt, QUndoCommand *parent) : QUndoCommand(parent), m_view(view), m_name(newfolderName), m_oldname(oldfolderName), m_id(clipId), m_doIt(doIt) { +EditFolderCommand::EditFolderCommand(ProjectList *view, const QString newfolderName, const QString oldfolderName, const QString &clipId, bool doIt, QUndoCommand *parent) : + QUndoCommand(parent), + m_view(view), + m_name(newfolderName), + m_oldname(oldfolderName), + m_id(clipId), + m_doIt(doIt) +{ setText(i18n("Rename folder")); } // virtual -void EditFolderCommand::undo() { +void EditFolderCommand::undo() +{ m_view->slotAddFolder(m_oldname, m_id, false, true); } // virtual -void EditFolderCommand::redo() { +void EditFolderCommand::redo() +{ if (m_doIt) m_view->slotAddFolder(m_name, m_id, false, true); m_doIt = true; }