Commit a1e2ddd6 authored by Eike Hein's avatar Eike Hein

Fix group dialog no longer resizing/closing as windows are closed and the group is dissolved

Summary:
Also delays the dialog resize until after the move transition ends
if there's going to be one, for a less jarring experience.

BUG:382638

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D7035
parent 2d59ec21
......@@ -125,6 +125,12 @@ PlasmaCore.Dialog {
}
}
onAnimatingChanged: {
if (!animating) {
updateSize();
}
}
Repeater {
id: groupRepeater
......@@ -140,7 +146,13 @@ PlasmaCore.Dialog {
return -1;
}
onCountChanged: updateSize();
onItemAdded: updateSize()
onItemRemoved: {
if (groupDialog.visible && index > 0 && index == count) {
updateSize();
}
}
}
}
}
......@@ -246,7 +258,7 @@ PlasmaCore.Dialog {
// Setting VisualDataModel.rootIndex drops groupRepeater.count to 0
// before the actual row count. updateSize is therefore invoked twice;
// only update size once the repeater count matches the model role.
} else if (visualParent.childCount == groupRepeater.count) {
} else if (!groupRepeater.aboutToPopulate || visualParent.childCount == groupRepeater.count) {
var task;
var maxWidth = 0;
var maxHeight = 0;
......
......@@ -68,6 +68,12 @@ MouseArea {
}
onChildCountChanged: {
if (!childCount && groupDialog.visualParent == task) {
groupDialog.visible = false;
return;
}
if (containsMouse) {
groupDialog.activeTask = null;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment