Fix favorite materials without material manager

We just track it via the preference value itself rather than duplicating that in any other data structure. It's simple enough.

Contributes to issue CURA-6776.
This commit is contained in:
Ghostkeeper 2019-09-20 09:34:40 +02:00
parent 12043df367
commit 4a68e7ec95
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
3 changed files with 45 additions and 6 deletions

View file

@ -82,11 +82,12 @@ Rectangle
{
if (materialSlot.is_favorite)
{
CuraApplication.getMaterialManager().removeFavorite(material.root_material_id)
return
CuraApplication.getMaterialManagementModel().removeFavorite(material.root_material_id)
}
else
{
CuraApplication.getMaterialManagementModel().addFavorite(material.root_material_id)
}
CuraApplication.getMaterialManager().addFavorite(material.root_material_id)
return
}
style: ButtonStyle
{