MCPcopy Create free account
hub / github.com/OpenBoard-org/OpenBoard / commitUndoStep

Method commitUndoStep

src/domain/UBGraphicsItemDelegate.cpp:745–762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

743
744
745void UBGraphicsItemDelegate::commitUndoStep()
746{
747 UBResizableGraphicsItem* resizableItem = dynamic_cast<UBResizableGraphicsItem*>(mDelegated);
748
749 if (mDelegated->pos() != mPreviousPosition
750 || mDelegated->transform() != mPreviousTransform
751 || (resizableItem && resizableItem->size() != mPreviousSize))
752 {
753 UBGraphicsItemTransformUndoCommand *uc =
754 new UBGraphicsItemTransformUndoCommand(mDelegated,
755 mPreviousPosition,
756 mPreviousTransform,
757 mPreviousZValue,
758 mPreviousSize);
759
760 UBApplication::undoStack->push(uc);
761 }
762}
763
764void UBGraphicsItemDelegate::onZoomChanged()
765{

Callers 3

mouseReleaseEventMethod · 0.80
foreachFunction · 0.80
mouseReleaseEventMethod · 0.80

Calls 2

posMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected