|
|
|
@ -120,8 +120,12 @@ void UBGraphicsItemUndoCommand::undo() |
|
|
|
|
{ |
|
|
|
|
UBGraphicsPolygonItem *polygonItem = qgraphicsitem_cast<UBGraphicsPolygonItem*>(item); |
|
|
|
|
if (polygonItem) |
|
|
|
|
{ |
|
|
|
|
mScene->removeItem(polygonItem); |
|
|
|
|
mScene->removeItemFromDeletion(polygonItem); |
|
|
|
|
polygonItem->strokesGroup()->addToGroup(polygonItem); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
UBApplication::boardController->freezeW3CWidget(item, false); |
|
|
|
|
} |
|
|
|
@ -225,9 +229,13 @@ void UBGraphicsItemUndoCommand::redo() |
|
|
|
|
|
|
|
|
|
UBGraphicsPolygonItem *polygonItem = qgraphicsitem_cast<UBGraphicsPolygonItem*>(item); |
|
|
|
|
if (polygonItem) |
|
|
|
|
{
|
|
|
|
|
mScene->removeItem(polygonItem); |
|
|
|
|
mScene->removeItemFromDeletion(polygonItem); |
|
|
|
|
polygonItem->strokesGroup()->addToGroup(polygonItem); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// force refresh, QT is a bit lazy and take a lot of time (nb item ^2) to trigger repaint
|
|
|
|
|
mScene->update(mScene->sceneRect()); |
|
|
|
|