Add some logging in debug mode for Cmd() members

This commit is contained in:
David Capello 2015-08-13 21:00:02 -03:00
parent 5b05c23722
commit ec2ef30f20

View File

@ -26,6 +26,7 @@ Cmd::~Cmd()
void Cmd::execute(Context* ctx)
{
DLOG("Cmd: Executing cmd '%s'\n", typeid(*this).name());
ASSERT(m_state == State::NotExecuted);
m_ctx = ctx;
@ -40,6 +41,7 @@ void Cmd::execute(Context* ctx)
void Cmd::undo()
{
DLOG("Cmd: Undo cmd '%s'\n", typeid(*this).name());
ASSERT(m_state == State::Executed || m_state == State::Redone);
onUndo();
@ -52,6 +54,7 @@ void Cmd::undo()
void Cmd::redo()
{
DLOG("Cmd: Redo cmd '%s'\n", typeid(*this).name());
ASSERT(m_state == State::Undone);
onRedo();