mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 22:35:03 -06:00
Fix model to use for comboboxes to check if they are empty
This was checking against the wrong model, it seems. Contributes to issue CURA-7865.
This commit is contained in:
parent
5a99ae168b
commit
63deea4721
1 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ ComboBox
|
|||
|
||||
property var defaultTextOnEmptyModel: catalog.i18nc("@label", "No items to select from") // Text displayed in the combobox when the model is empty
|
||||
property var defaultTextOnEmptyIndex: "" // Text displayed in the combobox when the model has items but no item is selected
|
||||
enabled: model.count > 0
|
||||
enabled: delegateModel.count > 0
|
||||
|
||||
onVisibleChanged: { popup.close() }
|
||||
|
||||
|
@ -81,7 +81,7 @@ ComboBox
|
|||
|
||||
text:
|
||||
{
|
||||
if (control.model.count == 0)
|
||||
if (control.delegateModel.count == 0)
|
||||
{
|
||||
return control.defaultTextOnEmptyModel != "" ? control.defaultTextOnEmptyModel : control.defaultTextOnEmptyIndex
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue