mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Add an empty state, when there are no configurations, showing a label indicating that the list is empty
Contributes to CURA-5876.
This commit is contained in:
parent
b1244b6bde
commit
4ba448077e
3 changed files with 21 additions and 11 deletions
|
@ -7,16 +7,15 @@ import QtQuick.Controls 2.3
|
|||
import UM 1.2 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
Column
|
||||
Item
|
||||
{
|
||||
id: base
|
||||
property var outputDevice: null
|
||||
height: childrenRect.height + padding
|
||||
spacing: UM.Theme.getSize("narrow_margin").height
|
||||
height: childrenRect.height
|
||||
|
||||
function forceModelUpdate()
|
||||
{
|
||||
// FIXME For now the model should be removed and then created again, otherwise changes in the printer don't automatically update the UI
|
||||
// FIXME For now the model has to be removed and then created again, otherwise changes in the printer don't automatically update the UI
|
||||
configurationList.model = []
|
||||
if (outputDevice)
|
||||
{
|
||||
|
@ -24,6 +23,17 @@ Column
|
|||
}
|
||||
}
|
||||
|
||||
// This component will appear when there is no configurations (e.g. when loosing connection)
|
||||
Label
|
||||
{
|
||||
width: parent.width
|
||||
visible: configurationList.model.length == 0
|
||||
text: "Configuration list empty. Probably because of lost connection" // TODO change this to a proper component
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
wrapMode: Text.WordWrap
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
ScrollView
|
||||
{
|
||||
id: container
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue