Two warnings fixe

This commit is contained in:
Stefan Persson 2011-02-07 13:52:30 +00:00
parent e48387c22c
commit bd1da0a7dd
2 changed files with 5 additions and 18 deletions

View file

@ -41,14 +41,14 @@ Rectangle{
}
},
State{
name: "pointLoaded" //; when: hangOnToPoint != undefined && hangOnToPoint.isLoaded != undefined && hangOnToPoint.parent != null && hangOnToPoint.parent != undefined && hangOnToPoint.verticalCenter != undefined //TODO might aswell use hangOnToPoint != undefined, still get null item warning, used hangOnToPoint.isLoaded too before, remove this?
name: "pointLoaded"
PropertyChanges {
target: barRectangle
anchors.verticalCenter: hangOnToPoint.verticalCenter
anchors.verticalCenter: hangOnToPoint.verticalCenter //TODO Warning on this and the line below... cannot fix, warning even if setting to undefined directly
anchors.left: hangOnToPoint.horizontalCenter
color: hangOnToPoint.actionTypeColor
opacity: hangOnToPoint.actionTypeOpacity
width: Scripts.getBarWidth(barRectangle, hangOnToPoint, hangOnToPoint.parent.children)
width: hangOnToPoint.parent == null ? 0 : Scripts.getBarWidth(barRectangle, hangOnToPoint, hangOnToPoint.parent.children)
}
}
]

View file

@ -147,9 +147,9 @@ Rectangle{
drag.target: pointRect
drag.axis: Drag.XAxis
drag.minimumX: -1 * pointRect.width/2
drag.maximumX: pointRect.parent.width - pointRect.width/2 //TODO: om pointRect.parent == null, då bara 0...
drag.maximumX: pointRect.parent == null ? 0 : pointRect.parent.width - pointRect.width/2
drag.filterChildren: true //TODO testing this
//TODO make it impossible to overlap (on release)
//TODO make it impossible to overlap (on release) (why?)
//TODO drag to most right - jumps back, why?
states: State{
@ -157,19 +157,6 @@ Rectangle{
PropertyChanges { target: pointRect; opacity: 0.5; }
}
}
/*
ListModel{
id: daysOfWeek
ListElement{
name: "on"
imagesource: "on.png" //TODO cannot use javascript properties here... do in some other way, maybe a list with names here?
}
ListElement{
name: "off"
imagesource: "off.png"
}
}
*/
Column{
spacing: 10