From 7e998c04fa0a17e828236d2b5b7065e3747dd396 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Wed, 8 Apr 2020 21:53:34 +0200 Subject: [PATCH] some fixes --- nymea-app/ui/delegates/ParamDelegate.qml | 2 +- nymea-app/ui/thingconfiguration/ConfigureThingPage.qml | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/nymea-app/ui/delegates/ParamDelegate.qml b/nymea-app/ui/delegates/ParamDelegate.qml index 6f6abd01..35bc0761 100644 --- a/nymea-app/ui/delegates/ParamDelegate.qml +++ b/nymea-app/ui/delegates/ParamDelegate.qml @@ -77,7 +77,7 @@ ItemDelegate { case "uint": case "int": case "double": - if (root.paramType.minValue && root.paramType.maxValue) { + if (root.paramType.minValue !== undefined && root.paramType.maxValue !== undefined) { return sliderComponent; } else { return spinnerComponent; diff --git a/nymea-app/ui/thingconfiguration/ConfigureThingPage.qml b/nymea-app/ui/thingconfiguration/ConfigureThingPage.qml index 70daa165..dd06e909 100644 --- a/nymea-app/ui/thingconfiguration/ConfigureThingPage.qml +++ b/nymea-app/ui/thingconfiguration/ConfigureThingPage.qml @@ -433,7 +433,13 @@ SettingsPageBase { engine.deviceManager.connectIO(inputThingId, inputStateTypeId, outputThingId, outputStateTypeId); } onReset: { - engine.deviceManager.disconnectIO(ioConnectionDialog.watcher.ioConnection.id); + if (ioConnectionDialog.ioStateType.ioType == Types.IOTypeDigitalInput + || ioConnectionDialog.ioStateType.ioType == Types.IOTypeAnalogInput) { + engine.deviceManager.disconnectIO(ioConnectionDialog.inputWatcher.ioConnection.id); + } else { + engine.deviceManager.disconnectIO(ioConnectionDialog.outputWatcher.ioConnection.id); + } + ioConnectionDialog.reject(); } }