source: molecuilder/src/Actions/MakroAction.cpp@ 32df34

Last change on this file since 32df34 was 32df34, checked in by Tillmann Crueger <crueger@…>, 16 years ago

Added an action that allows grouping and grouped execution of several actions.

  • Property mode set to 100644
File size: 565 bytes
Line 
1/*
2 * MakroAction.cpp
3 *
4 * Created on: Dec 17, 2009
5 * Author: crueger
6 */
7
8#include "Actions/MakroAction.hpp"
9#include "Actions/Action.hpp"
10#include "Actions/ActionSequence.hpp"
11
12MakroAction::MakroAction(ActionSequence* _actions) :
13actions(_actions)
14{
15}
16
17MakroAction::~MakroAction()
18{
19 Action* action;
20 while(action=actions->removeLastAction()){
21 delete action;
22 }
23 delete actions;
24}
25
26
27void MakroAction::call(){
28 actions->callAll();
29}
30
31void MakroAction::undo() {
32 actions->undoAll();
33}
34
35bool MakroAction::canUndo() {
36 return actions->canUndo();
37}
Note: See TracBrowser for help on using the repository browser.