Reset parentItem when mainItem changes

Otherwise we'll keep piling up custom tooltip items in the dialog. They're invisible but they're still there.

Differential Revision: https://phabricator.kde.org/D17542
This commit is contained in:
Kai Uwe Broulik 2019-01-10 12:12:06 +01:00
parent 39aa628e17
commit f4bd4a6131

View File

@ -783,6 +783,7 @@ void Dialog::setMainItem(QQuickItem *mainItem)
if (d->mainItem) {
disconnect(d->mainItem, nullptr, this, nullptr);
d->mainItem->setVisible(false);
d->mainItem->setParentItem(nullptr);
}
if (d->mainItemLayout) {