diff --git a/qml/components/ChoiceSetting.qml b/qml/components/ChoiceSetting.qml index cc8df87..1d8e28f 100644 --- a/qml/components/ChoiceSetting.qml +++ b/qml/components/ChoiceSetting.qml @@ -14,7 +14,11 @@ Setting { displayValue: Utils.ippName(name, choice != undefined ? choice : default_choice, strings) onClicked: { - if(actual_choices.length>num_large_choices) + if(hasMenu) + { + menu.open(this) + } + else if(actual_choices.length != 0) { var dialog = pageStack.push("LargeChoiceDialog.qml", {name:name, choice: choice != undefined ? choice : default_choice, choices: actual_choices, @@ -24,10 +28,6 @@ Setting { choice = dialog.choice }) } - else - { - menu.open(this) - } } menu: ContextMenu { @@ -45,7 +45,5 @@ Setting { } - hasMenu: !actual_choices.length>num_large_choices - - + hasMenu: actual_choices.length != 0 && (actual_choices.length <= num_large_choices) }