r23140 by jghali - Merge undo actions created when creating new Bezier liner
scribus-commit
scribus-commit at lists.scribus.net
Mon Aug 19 13:54:10 UTC 2019
Author: jghali
Date: Mon Aug 19 13:54:10 2019
New Revision: 23140
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23140
Log:
Merge undo actions created when creating new Bezier liner
Modified:
trunk/Scribus/scribus/canvasmode_drawbezier.cpp
Modified: trunk/Scribus/scribus/canvasmode_drawbezier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23140&path=/trunk/Scribus/scribus/canvasmode_drawbezier.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawbezier.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_drawbezier.cpp Mon Aug 19 13:54:10 2019
@@ -158,8 +158,10 @@
inItemCreation = false;
}
+ UndoTransaction undoTrans;
if (currItem && UndoManager::undoEnabled())
{
+ undoTrans = undoManager->beginTransaction("creating");
ScItemState<PageItem*> *is = new ScItemState<PageItem*>("Create PageItem");
is->set("CREATE_ITEM");
is->setItem(currItem);
@@ -180,6 +182,14 @@
currItem->ContourLine = currItem->PoLine.copy();
currItem->ClipEdited = true;
currItem->FrameType = 3;
+
+ if (undoTrans)
+ {
+ QString targetName = Um::ScratchSpace;
+ if (currItem->OwnPage > -1)
+ targetName = m_doc->Pages->at(currItem->OwnPage)->getUName();
+ undoTrans.commit(targetName, currItem->getUPixmap(), Um::Create + " " + currItem->getUName(), "", Um::ICreate);
+ }
}
void BezierMode::mouseDoubleClickEvent(QMouseEvent *m)
More information about the scribus-commit
mailing list