Fix menu lock bug with no choices
This commit is contained in:
parent
dd19333c81
commit
f84d05e514
1 changed files with 6 additions and 8 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue