Commit 71a017fa authored by Ismael Asensio's avatar Ismael Asensio
Browse files

containments/panel: Fix state when dragging gets canceled

In panel edition, when dragging an applet to reorder the layout,
we were not handling the case when the dragging operation gets

Dragging cancelation can be triggered by pressing <Esc> or other
focus-intrusive operations like a delayed screenshot.

This led to an unconsistent state of the panel where the dragged
applet would just stay out the layout, floating in the last
position it was dragged to.

For now, acting on the `canceled` signal just as if the dragging
was `released` seems the simpler to avoid a messed-up panel.

BUG: 446814
parent 2bb287b6
Pipeline #111221 passed with stage
in 3 minutes and 54 seconds
......@@ -215,8 +215,12 @@ MouseArea {
currentApplet.z = 900;
onReleased: {
if (!root.dragOverlay.currentApplet) {
onReleased: finishDragOperation()
onCanceled: finishDragOperation()
function finishDragOperation() {
if (!currentApplet) {
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