File indexing completed on 2024-05-12 16:01:32

0001 /*
0002  *  SPDX-FileCopyrightText: 2014 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #include "kis_gui_context_command_p.h"
0008 #include "kundo2command.h"
0009 
0010 KisGuiContextCommandDelegate::KisGuiContextCommandDelegate(QObject *parent)
0011     : QObject(parent)
0012 {
0013 }
0014 
0015 void KisGuiContextCommandDelegate::executeCommand(KUndo2Command *command, bool undo)
0016 {
0017     if (!undo) {
0018         command->redo();
0019     } else {
0020         command->undo();
0021     }
0022 }