[TechDraw] Reimplement Rich Annotation parent linking

This commit is contained in:
pavltom
2024-02-15 17:06:21 +01:00
committed by WandererFan
parent df86220427
commit ed3a1a6184
18 changed files with 136 additions and 194 deletions

View File

@@ -669,16 +669,17 @@ void QGIView::switchParentItem(QGIView *targetParent)
if (currentParent != targetParent) {
if (targetParent) {
targetParent->addToGroup(this);
targetParent->updateView();
if (currentParent) {
currentParent->updateView();
}
}
else {
currentParent->removeFromGroup(this);
}
if (currentParent) {
currentParent->updateView();
}
if (targetParent) {
targetParent->updateView();
while (currentParent) {
currentParent->removeFromGroup(this);
currentParent->updateView();
currentParent = dynamic_cast<QGIView *>(this->parentItem());
}
}
}
}