Revert "don't expand if still creating the representation"
This reverts commit c3a38d3434dc781532f75d760c9f7426594edf37.
This commit is contained in:
parent
c3a38d3434
commit
de73bbb278
@ -48,8 +48,7 @@ AppletQuickItemPrivate::AppletQuickItemPrivate(Plasma::Applet *a, AppletQuickIte
|
|||||||
switchWidth(-1),
|
switchWidth(-1),
|
||||||
switchHeight(-1),
|
switchHeight(-1),
|
||||||
applet(a),
|
applet(a),
|
||||||
expanded(false),
|
expanded(false)
|
||||||
creatingFullRepresentation(false)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -185,9 +184,7 @@ QObject *AppletQuickItemPrivate::createFullRepresentationItem()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (fullRepresentation && fullRepresentation.data() != qmlObject->mainComponent()) {
|
if (fullRepresentation && fullRepresentation.data() != qmlObject->mainComponent()) {
|
||||||
creatingFullRepresentation = true;
|
|
||||||
fullRepresentationItem = qmlObject->createObjectFromComponent(fullRepresentation.data(), QtQml::qmlContext(qmlObject->rootObject()));
|
fullRepresentationItem = qmlObject->createObjectFromComponent(fullRepresentation.data(), QtQml::qmlContext(qmlObject->rootObject()));
|
||||||
creatingFullRepresentation = false;
|
|
||||||
} else {
|
} else {
|
||||||
fullRepresentation = qmlObject->mainComponent();
|
fullRepresentation = qmlObject->mainComponent();
|
||||||
fullRepresentationItem = qmlObject->rootObject();
|
fullRepresentationItem = qmlObject->rootObject();
|
||||||
@ -628,10 +625,6 @@ bool AppletQuickItem::isExpanded() const
|
|||||||
|
|
||||||
void AppletQuickItem::setExpanded(bool expanded)
|
void AppletQuickItem::setExpanded(bool expanded)
|
||||||
{
|
{
|
||||||
if (d->creatingFullRepresentation) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (d->applet->isContainment()) {
|
if (d->applet->isContainment()) {
|
||||||
expanded = true;
|
expanded = true;
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,6 @@ public:
|
|||||||
Plasma::Package coronaPackage;
|
Plasma::Package coronaPackage;
|
||||||
|
|
||||||
bool expanded : 1;
|
bool expanded : 1;
|
||||||
bool creatingFullRepresentation : 1;
|
|
||||||
|
|
||||||
static QHash<QObject *, AppletQuickItem *> s_rootObjects;
|
static QHash<QObject *, AppletQuickItem *> s_rootObjects;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user