Commit 3b1e4715 authored by Aleksei Kanash's avatar Aleksei Kanash

Undo stack used for duplicated items like strokes.

parent d2ec994e
......@@ -685,7 +685,14 @@ UBGraphicsItem *UBBoardController::duplicateItem(UBItem *item, bool bAsync)
}
if (retItem)
{
QGraphicsItem *graphicsRetItem = dynamic_cast<QGraphicsItem *>(retItem);
if (graphicsRetItem && mActiveScene->isURStackIsEnabled()) { //should be deleted after scene own undo stack implemented
UBGraphicsItemUndoCommand* uc = new UBGraphicsItemUndoCommand(mActiveScene, 0, graphicsRetItem);
UBApplication::undoStack->push(uc);
}
return retItem;
}
UBItem *createdItem = downloadFinished(true, sourceUrl, srcFile, contentTypeHeader, pData, itemPos, QSize(itemSize.width(), itemSize.height()), false);
if (createdItem)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment