diff --git a/qmlui/qml/IconButton.qml b/qmlui/qml/IconButton.qml index 2cd64f1a94..1d0ee23404 100644 --- a/qmlui/qml/IconButton.qml +++ b/qmlui/qml/IconButton.qml @@ -153,23 +153,21 @@ Button } } ] - - MouseArea + } + MouseArea + { + id: ctrlMouseArea + anchors.fill: parent + onClicked: + { + if (control.checkable) { - id: ctrlMouseArea - anchors.fill: parent - onClicked: - { - if (checkable) - { - control.toggle() - control.toggled() - } - else - control.clicked() - } + control.toggle() + control.toggled() } + else + control.clicked() } - + } } diff --git a/qmlui/qml/TreeNodeDelegate.qml b/qmlui/qml/TreeNodeDelegate.qml index f421b52760..4bdfb4da5c 100644 --- a/qmlui/qml/TreeNodeDelegate.qml +++ b/qmlui/qml/TreeNodeDelegate.qml @@ -125,10 +125,11 @@ Column drag.target: dragItem - onPressed: nodeContainer.mouseEvent(App.Pressed, cRef ? cRef.id : -1, nodeContainer.itemType, - nodeContainer, mouse.modifiers) - onClicked: - { + onPressed: function (mouse) { + nodeContainer.mouseEvent(App.Pressed, cRef ? cRef.id : -1, nodeContainer.itemType, + nodeContainer, mouse.modifiers) + } + onClicked: function (mouse) { nodeLabel.forceActiveFocus() nodeContainer.mouseEvent(App.Clicked, cRef ? cRef.id : -1, nodeContainer.itemType, nodeContainer, mouse.modifiers) diff --git a/qmlui/qml/fixturesfunctions/2DView.qml b/qmlui/qml/fixturesfunctions/2DView.qml index e3ebe26daf..7f4023007c 100644 --- a/qmlui/qml/fixturesfunctions/2DView.qml +++ b/qmlui/qml/fixturesfunctions/2DView.qml @@ -349,8 +349,7 @@ Rectangle drag.threshold: 10 drag.target: parent - onReleased: - { + onReleased: function (mouse) { if (drag.active) { var units = View2D.gridUnits === MonitorProperties.Meters ? 1000.0 : 304.8 diff --git a/qmlui/qml/fixturesfunctions/Fixture2DItem.qml b/qmlui/qml/fixturesfunctions/Fixture2DItem.qml index 68259a271d..ed5f7192a8 100644 --- a/qmlui/qml/fixturesfunctions/Fixture2DItem.qml +++ b/qmlui/qml/fixturesfunctions/Fixture2DItem.qml @@ -301,8 +301,7 @@ Rectangle onEntered: fixtureLabel.visible = true onExited: showLabel ? fixtureLabel.visible = true : fixtureLabel.visible = false - onPressed: - { + onPressed: function (mouse) { // do not accept this event to propagate it to the drag rectangle mouse.accepted = false } diff --git a/qmlui/qml/fixturesfunctions/FixtureBrowser.qml b/qmlui/qml/fixturesfunctions/FixtureBrowser.qml index f644537b08..8a4a38f369 100644 --- a/qmlui/qml/fixturesfunctions/FixtureBrowser.qml +++ b/qmlui/qml/fixturesfunctions/FixtureBrowser.qml @@ -132,8 +132,7 @@ Rectangle width: modelsList.width - (manufScroll.visible ? manufScroll.width : 0) isManufacturer: true textLabel: modelData - onMouseEvent: - { + onMouseEvent: function (type, iID, iType, qItem, mouseMods) { if (type == App.Clicked) { mfText.label = modelData @@ -239,8 +238,7 @@ Rectangle manufacturer: fixtureBrowser.selectedManufacturer textLabel: modelData - onMouseEvent: - { + onMouseEvent: function (type, iID, iType, qItem, mouseMods) { if (type == App.Clicked) { modelsList.currentIndex = index diff --git a/qmlui/qml/fixturesfunctions/FixtureBrowserDelegate.qml b/qmlui/qml/fixturesfunctions/FixtureBrowserDelegate.qml index b7fe91a0a7..8142b8b9ce 100644 --- a/qmlui/qml/fixturesfunctions/FixtureBrowserDelegate.qml +++ b/qmlui/qml/fixturesfunctions/FixtureBrowserDelegate.qml @@ -111,12 +111,13 @@ Item id: fxMouseArea anchors.fill: parent hoverEnabled: true - onClicked: fxDraggableItem.mouseEvent(App.Clicked, 0, 0, fxDraggableItem, mouse.modifiers) + onClicked: function (mouse) { + fxDraggableItem.mouseEvent(App.Clicked, 0, 0, fxDraggableItem, mouse.modifiers) + } drag.target: FixtureDragItem { } drag.threshold: 30 - onPressed: - { + onPressed: function (mouse) { if (fxDraggableItem.isManufacturer == false) { fxDraggableItem.mouseEvent(App.Clicked, 0, 0, fxDraggableItem, mouse.modifiers) @@ -124,11 +125,13 @@ Item FxDragJS.initProperties() } } - onPositionChanged: + onPositionChanged: function (mouse) { if (fxDraggableItem.isManufacturer == false && drag.active == true) FxDragJS.handleDrag(mouse) - onReleased: + } + onReleased: function (mouse) { if (fxDraggableItem.isManufacturer == false && drag.active == true) FxDragJS.endDrag(mouse) + } } } diff --git a/qmlui/qml/fixturesfunctions/LeftPanel.qml b/qmlui/qml/fixturesfunctions/LeftPanel.qml index 9537338ff5..1c25b86880 100644 --- a/qmlui/qml/fixturesfunctions/LeftPanel.qml +++ b/qmlui/qml/fixturesfunctions/LeftPanel.qml @@ -31,8 +31,7 @@ SidePanel anchors.leftMargin: 0 panelAlignment: Qt.AlignLeft - onContentLoaded: - { + onContentLoaded: function (item, ID) { item.width = Qt.binding(function() { return leftSidePanel.width - collapseWidth }) item.height = Qt.binding(function() { return leftSidePanel.height }) }