SlotsLayout with Column as mainSlot: endless loop when resizing view so that Column has negative width
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Committed
|
Undecided
|
Unassigned | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Medium
|
Andrea Bernabei |
Bug Description
With a simple code such as
import QtQuick 2.4
import Ubuntu.Components 1.3
import QtQuick.Window 2.0
Window {
SlotsLayout {
id: slotsLayout
width: parent.width
mainSlot: Column {
id: rect
}
}
}
}
Or something similar (http://
Related branches
- Marco Trevisan (Treviño) (community): Approve
- ubuntu-sdk-build-bot: Approve (continuous-integration)
- Cris Dywan: Approve
- Zsombor Egri: Pending requested
-
Diff: 60 lines (+32/-1)2 files modifiedsrc/UbuntuToolkit/ucslotslayout.cpp (+4/-1)
tests/unit/visual/tst_slotslayout.13.qml (+28/-0)
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | Triaged → In Progress |
Changed in ubuntu-ui-toolkit (Ubuntu RTM): | |
assignee: | nobody → Andrea Bernabei (faenil) |
importance: | Undecided → Medium |
status: | New → In Progress |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | In Progress → Fix Committed |
no longer affects: | ubuntu-ui-toolkit (Ubuntu RTM) |
Changed in canonical-devices-system-image: | |
status: | New → Fix Committed |
info for my future self:
I investigated this bug a few days ago, when Trevinho first reported it directly to me.
It turns out the loop is triggered when the view is resized so that the column gets a *negative* width.
At that point you see columns height going 0 to 5 (which is rectangle's height) and back to 0, in a loop, and width going -X to 0 to -X again.