some fixes

This commit is contained in:
Michael Zanetti 2020-04-08 21:53:34 +02:00
parent 373483f377
commit 7e998c04fa
2 changed files with 8 additions and 2 deletions

View File

@ -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;

View File

@ -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();
}
}