From a76d0d85c1f5b6c79087d624faef6bd507807911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fauconnier?= Date: Fri, 24 Sep 2021 14:46:32 +0200 Subject: [PATCH] fixed an issue where eraseBackground then undo would make a PDF being partly attached as a background and behave as an object --- src/domain/UBGraphicsItemUndoCommand.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domain/UBGraphicsItemUndoCommand.cpp b/src/domain/UBGraphicsItemUndoCommand.cpp index 7653a054..4787aed5 100644 --- a/src/domain/UBGraphicsItemUndoCommand.cpp +++ b/src/domain/UBGraphicsItemUndoCommand.cpp @@ -128,7 +128,7 @@ void UBGraphicsItemUndoCommand::undo() QGraphicsItem* item = itRemoved.next(); if (item) { - if (UBItemLayerType::FixedBackground == item->data(UBGraphicsItemData::ItemLayerType)) + if (itemLayerType::BackgroundItem == item->data(UBGraphicsItemData::itemLayerType)) mScene->setAsBackgroundObject(item); else mScene->addItem(item);