diff --git a/telldus-gui/Plugins/SchedulerGUISimple/ActionBar.qml b/telldus-gui/Plugins/SchedulerGUISimple/ActionBar.qml index 0be54a2e..b70d281a 100644 --- a/telldus-gui/Plugins/SchedulerGUISimple/ActionBar.qml +++ b/telldus-gui/Plugins/SchedulerGUISimple/ActionBar.qml @@ -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) } } ] diff --git a/telldus-gui/Plugins/SchedulerGUISimple/ActionPoint.qml b/telldus-gui/Plugins/SchedulerGUISimple/ActionPoint.qml index 984743d9..dc72e15e 100644 --- a/telldus-gui/Plugins/SchedulerGUISimple/ActionPoint.qml +++ b/telldus-gui/Plugins/SchedulerGUISimple/ActionPoint.qml @@ -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