You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
678 B
34 lines
678 B
/*
|
|
* UBGraphicsTextItemUndoCommand.cpp
|
|
*
|
|
* Created on: July 7, 2009
|
|
* Author: Jerome
|
|
*/
|
|
|
|
#include "UBGraphicsTextItemUndoCommand.h"
|
|
#include "UBGraphicsTextItem.h"
|
|
|
|
#include "core/memcheck.h"
|
|
|
|
UBGraphicsTextItemUndoCommand::UBGraphicsTextItemUndoCommand(UBGraphicsTextItem *textItem)
|
|
: mTextItem(textItem)
|
|
{
|
|
// NOOP
|
|
}
|
|
|
|
UBGraphicsTextItemUndoCommand::~UBGraphicsTextItemUndoCommand()
|
|
{
|
|
// NOOP
|
|
}
|
|
|
|
void UBGraphicsTextItemUndoCommand::undo()
|
|
{
|
|
if(mTextItem && mTextItem->document())
|
|
mTextItem->document()->undo();
|
|
}
|
|
|
|
void UBGraphicsTextItemUndoCommand::redo()
|
|
{
|
|
if(mTextItem && mTextItem->document())
|
|
mTextItem->document()->redo();
|
|
}
|
|
|