From bbddca04b3a98973996d337db0bf8edfdb38b3e9 Mon Sep 17 00:00:00 2001 From: Anton Thomasson Date: Tue, 24 Nov 2020 18:13:03 +0100 Subject: [PATCH] Try undefined as default choice --- qml/pages/PrinterPage.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qml/pages/PrinterPage.qml b/qml/pages/PrinterPage.qml index 0b180fa..ebb3e0a 100644 --- a/qml/pages/PrinterPage.qml +++ b/qml/pages/PrinterPage.qml @@ -73,7 +73,7 @@ Page { return isValid(name) ? printer.attrs[name+"-supported"].value : []; } function getDefaultChoice(name) { - return printer.attrs.hasOwnProperty(name+"-default") ? printer.attrs[name+"-default"].value : ""; + return printer.attrs.hasOwnProperty(name+"-default") ? printer.attrs[name+"-default"].value : undefined; } } @@ -106,7 +106,7 @@ Page { valid: utils.isValid(name) low: valid ? printer.attrs[name+"-supported"].value.low : 0 high: valid ? printer.attrs[name+"-supported"].value.high : 0 - default_choice: printer.attrs.hasOwnProperty(name+"-default") ? printer.attrs[name+"-default"].value : undefined + default_choice: utils.getDefaultChoice(name) onChoiceChanged: page.choiceMade(name, tag, choice) }