fix tooltip resize in folderview

also, detach from old layouts if the mainitem changes
This commit is contained in:
Marco Martin 2014-06-17 21:54:55 +02:00
parent de43b9b547
commit 1f633ad0a1
2 changed files with 7 additions and 1 deletions

View File

@ -129,6 +129,7 @@ void ToolTipDialog::adjustGeometry(const QRect &geom)
}
startGeom.setSize(geom.size());
setGeometry(startGeom);
m_animation->setStartValue(startGeom.topLeft());
m_animation->setEndValue(geom.topLeft());

View File

@ -521,6 +521,8 @@ void Dialog::setMainItem(QQuickItem *mainItem)
//Extract the representation's Layout, if any
QObject *layout = 0;
setMinimumSize(QSize(0, 0));
setMaximumSize(QSize(DIALOGSIZE_MAX, DIALOGSIZE_MAX));
//Search a child that has the needed Layout properties
//HACK: here we are not type safe, but is the only way to access to a pointer of Layout
@ -534,6 +536,9 @@ void Dialog::setMainItem(QQuickItem *mainItem)
layout = child;
}
}
if (d->mainItemLayout) {
disconnect(d->mainItemLayout.data(), 0, this, 0);
}
d->mainItemLayout = layout;
if (layout) {