Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: copy ItemOwnZValue when cloning item #1174

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/domain/UBGraphicsMediaItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ void UBGraphicsMediaItem::copyItemParameters(UBItem *copy) const
cp->setData(UBGraphicsItemData::ItemLayerType, this->data(UBGraphicsItemData::ItemLayerType));
cp->setData(UBGraphicsItemData::ItemLocked, this->data(UBGraphicsItemData::ItemLocked));
cp->setData(UBGraphicsItemData::ItemIsHiddenOnDisplay, this->data(UBGraphicsItemData::ItemIsHiddenOnDisplay));
cp->setData(UBGraphicsItemData::ItemOwnZValue, this->data(UBGraphicsItemData::ItemOwnZValue));
cp->setSourceUrl(this->sourceUrl());
cp->setSize(rect().width(), rect().height());

Expand Down
1 change: 1 addition & 0 deletions src/domain/UBGraphicsPDFItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ void UBGraphicsPDFItem::copyItemParameters(UBItem *copy) const
cp->setFlag(QGraphicsItem::ItemIsMovable, true);
cp->setFlag(QGraphicsItem::ItemIsSelectable, true);
cp->setData(UBGraphicsItemData::ItemLayerType, this->data(UBGraphicsItemData::ItemLayerType));
cp->setData(UBGraphicsItemData::ItemOwnZValue, this->data(UBGraphicsItemData::ItemOwnZValue));
cp->setSourceUrl(this->sourceUrl());
cp->setZValue(this->zValue());
}
Expand Down
1 change: 1 addition & 0 deletions src/domain/UBGraphicsPixmapItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ void UBGraphicsPixmapItem::copyItemParameters(UBItem *copy) const
cp->setData(UBGraphicsItemData::ItemLayerType, this->data(UBGraphicsItemData::ItemLayerType));
cp->setData(UBGraphicsItemData::ItemLocked, this->data(UBGraphicsItemData::ItemLocked));
cp->setData(UBGraphicsItemData::ItemIsHiddenOnDisplay, this->data(UBGraphicsItemData::ItemIsHiddenOnDisplay));
cp->setData(UBGraphicsItemData::ItemOwnZValue, this->data(UBGraphicsItemData::ItemOwnZValue));
cp->setSourceUrl(this->sourceUrl());

cp->setZValue(this->zValue());
Expand Down
1 change: 1 addition & 0 deletions src/domain/UBGraphicsPolygonItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ void UBGraphicsPolygonItem::copyItemParameters(UBItem *copy) const
cp->setColorOnLightBackground(this->colorOnLightBackground());

cp->setZValue(this->zValue());
cp->setData(UBGraphicsItemData::ItemOwnZValue, this->data(UBGraphicsItemData::ItemOwnZValue));
cp->setData(UBGraphicsItemData::ItemLayerType, this->data(UBGraphicsItemData::ItemLayerType));
}
}
Expand Down
1 change: 1 addition & 0 deletions src/domain/UBGraphicsStrokesGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ void UBGraphicsStrokesGroup::copyItemParameters(UBItem *copy) const
cp->setData(UBGraphicsItemData::ItemLayerType, this->data(UBGraphicsItemData::ItemLayerType));
cp->setData(UBGraphicsItemData::ItemLocked, this->data(UBGraphicsItemData::ItemLocked));
cp->setData(UBGraphicsItemData::ItemIsHiddenOnDisplay, this->data(UBGraphicsItemData::ItemIsHiddenOnDisplay));
cp->setData(UBGraphicsItemData::ItemOwnZValue, this->data(UBGraphicsItemData::ItemOwnZValue));
cp->setZValue(this->zValue());
}
}
Expand Down
1 change: 1 addition & 0 deletions src/domain/UBGraphicsSvgItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ void UBGraphicsSvgItem::copyItemParameters(UBItem *copy) const
cp->setData(UBGraphicsItemData::ItemLayerType, this->data(UBGraphicsItemData::ItemLayerType));
cp->setData(UBGraphicsItemData::ItemLocked, this->data(UBGraphicsItemData::ItemLocked));
cp->setData(UBGraphicsItemData::ItemIsHiddenOnDisplay, this->data(UBGraphicsItemData::ItemIsHiddenOnDisplay));
cp->setData(UBGraphicsItemData::ItemOwnZValue, this->data(UBGraphicsItemData::ItemOwnZValue));
cp->setSourceUrl(this->sourceUrl());
cp->setZValue(this->zValue());
}
Expand Down
1 change: 1 addition & 0 deletions src/domain/UBGraphicsTextItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ void UBGraphicsTextItem::copyItemParameters(UBItem *copy) const
cp->setData(UBGraphicsItemData::ItemLocked, this->data(UBGraphicsItemData::ItemLocked));
cp->setData(UBGraphicsItemData::ItemIsHiddenOnDisplay, this->data(UBGraphicsItemData::ItemIsHiddenOnDisplay));
cp->setData(UBGraphicsItemData::ItemEditable, data(UBGraphicsItemData::ItemEditable).toBool());
cp->setData(UBGraphicsItemData::ItemOwnZValue, this->data(UBGraphicsItemData::ItemOwnZValue));
cp->setTextWidth(this->textWidth());
cp->setTextHeight(this->textHeight());

Expand Down
1 change: 1 addition & 0 deletions src/domain/UBGraphicsWidgetItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1507,6 +1507,7 @@ void UBGraphicsW3CWidgetItem::copyItemParameters(UBItem *copy) const
cp->setData(UBGraphicsItemData::ItemLayerType, this->data(UBGraphicsItemData::ItemLayerType));
cp->setData(UBGraphicsItemData::ItemLocked, this->data(UBGraphicsItemData::ItemLocked));
cp->setData(UBGraphicsItemData::ItemIsHiddenOnDisplay, this->data(UBGraphicsItemData::ItemIsHiddenOnDisplay));
cp->setData(UBGraphicsItemData::ItemOwnZValue, this->data(UBGraphicsItemData::ItemOwnZValue));
cp->setSourceUrl(this->sourceUrl());

cp->resize(this->size());
Expand Down
1 change: 1 addition & 0 deletions src/tools/UBGraphicsCurtainItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ void UBGraphicsCurtainItem::copyItemParameters(UBItem *copy) const
cp->setFlag(QGraphicsItem::ItemIsMovable, true);
cp->setFlag(QGraphicsItem::ItemIsSelectable, true);
cp->setData(UBGraphicsItemData::ItemLayerType, this->data(UBGraphicsItemData::ItemLayerType));
cp->setData(UBGraphicsItemData::ItemOwnZValue, this->data(UBGraphicsItemData::ItemOwnZValue));
cp->setZValue(this->zValue());
}
}
Expand Down