22 Commits

Author SHA1 Message Date
Ghostkeeper
66ed9ed201
Remove optimisation that broke updates of models upon metadata change
If the metadata changed, such as whether a material was favourite or not, then the materials models were not updating any more because the actual list of available materials was still the same.
I've removed this optimisation and tested performance locally. It seems to be slightly slower (though that might be placebo or measurement error). However most of the performance boost of cura-6016 was resulting from different changes there so the interface still seems to be quite a lot faster than what it used to be.

Contributes to issue CURA-6032.
2018-12-18 16:52:04 +01:00
Remco Burema
b413b4cdb6 Correct a typo in typing. [CURA-6016] 2018-12-11 17:21:14 +01:00
Jaime van Kessel
f67ac8d7c4 Update far less agressively for the material models
CURA-6016
2018-12-11 10:59:17 +01:00
Lipu Fei
97e6354c13 Fix material update upon extruder-compatible diameter change
CURA-5834

Material models and the material container on an extruder need to be
updated when the extruder's compatible diameter gets changes.
2018-10-19 13:48:52 +02:00
Ghostkeeper
c6fa9474d6
Merge branch '3.5' 2018-09-17 14:41:45 +02:00
Diego Prado Gesto
6d2492e5cb Remove spurious signal, it does the same as materialsUpdated.
Contributes to CURA-5682.
2018-09-12 12:59:13 +02:00
Jaime van Kessel
e7d9f0ce45 Added typing for various setting classes 2018-09-10 15:24:11 +02:00
Lipu Fei
40c4e9c5df Fix KeyError color_code in BaseMaterialsModel 2018-08-28 09:56:00 +02:00
Lipu Fei
33f495442a Remove unneeded code
CURA-5162
2018-08-27 10:44:41 +02:00
Ian Paschal
2304aeaceb Expanded states preserved when updating models
Did this so that models can be updated more often fixing bugs where when a material is set as "not favorite" in the favorites section, its updated accordingly in its "normal" section.

It's also the ground work for saving material section expansion to preferences.

Contributes to CURA-5378
2018-08-24 12:10:32 +02:00
Ian Paschal
6be9b5e27f Consolidate models some more
Contributes to CURA-5162, CURA-5378
2018-08-23 16:58:23 +02:00
Ian Paschal
56a5f59964 Cleaner code
I was hoping to completely nix the generic materials model (since it's basically just a brand "Generic", but then in the QML it has to be have the same in terms of sub-menus or fold-outs and that looked stupid (Generic -> ABS -> ABS)). So we keep that one for now. It is cleaner though.

Contributes to CURA-5162, CURA-5378
2018-08-23 16:39:40 +02:00
Ian Paschal
6225fff1f8 Re-added material detail view
Contributes to CURA-5378
2018-08-22 15:58:58 +02:00
Ian Paschal
cb713eea6a Improve models
Contributes to CURA-5162, CURA-5378
2018-08-22 12:33:29 +02:00
Ian Paschal
68bccd8bf7 Improve the Favorites, Base, and Brand materials models (WIP)
Contribuetes to CURA-5378
2018-08-20 17:16:54 +02:00
Diego Prado Gesto
a4b46be2c5 CURA-5427 Force the material models to update when the machine changes and so
when the extruder stack changes.
- What happen was that when the extruder model needed to update, the
material model was not updated correctly and so when changing a material, the
node was incorrect.
2018-06-01 12:58:08 +02:00
Lipu Fei
6cae5c2e35 Remove unnecessary signal connection in MaterialsModel
CURA-5052
2018-03-07 10:39:23 +01:00
Lipu Fei
cb7677347d Fix material model update upon variant change
CURA-5052
2018-03-06 15:27:05 +01:00
Lipu Fei
4b7c8a8a80 Add doc for BaseMaterialsModel 2018-03-01 15:09:58 +01:00
Lipu Fei
b4c3536999 Move getAvailableMaterials() into MaterialManager 2018-03-01 15:02:57 +01:00
Lipu Fei
c21174eea8 Fix the usage of protected variables in material models 2018-03-01 11:55:29 +01:00
Lipu Fei
580244a546 Split material models into separate files 2018-03-01 11:50:55 +01:00