mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 22:29:01 +08: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
@ -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…
x
Reference in New Issue
Block a user