diff --git a/src/plasmaquick/dialog.cpp b/src/plasmaquick/dialog.cpp index 91221e945..67042b30b 100644 --- a/src/plasmaquick/dialog.cpp +++ b/src/plasmaquick/dialog.cpp @@ -122,7 +122,6 @@ public: Plasma::FrameSvgItem *frameSvgItem; QPointer mainItem; QPointer visualParent; - QPointer oldMainItemParent; QTimer hintsCommitTimer; QRect cachedGeometry; @@ -635,13 +634,13 @@ void Dialog::setMainItem(QQuickItem *mainItem) if (d->mainItem != mainItem) { d->hintsCommitTimer.stop(); if (d->mainItem) { - d->mainItem->setParentItem(d->oldMainItemParent); + d->mainItem->setVisible(false); } d->mainItem = mainItem; if (mainItem) { - d->oldMainItemParent = mainItem->parentItem(); + d->mainItem->setVisible(true); mainItem->setParentItem(contentItem()); connect(mainItem, SIGNAL(widthChanged()), this, SLOT(slotMainItemSizeChanged()));