17 Commits

Author SHA1 Message Date
Ghostkeeper
f3af5a72ad
Use ListModel.count instead of rowCount
The .count property properly updates when the model is changed.

Contributes to issue CURA-5876.
2018-12-03 11:13:26 +01:00
Aleksei S
b44fb7ca24 Select correct material according to the active extruder
CURA-5682
2018-09-21 17:35:46 +02:00
Aleksei S
86d8f8517d In material page was not defined the used extruder nr, for generic materials
CURA-5682
2018-09-21 13:48:46 +02:00
Diego Prado Gesto
bafc2b98c9 Reuse MaterialBrandSection component for Favorites, Generic and branded
materials.

This component will show different children depending on the
hasMaterialTypes flag.

Adjust some small UI issues.

Contributes to CURA-5682.
2018-09-17 12:08:41 +02:00
Diego Prado Gesto
f871a89825 Clean up the code by removing duplicate code. Also try to unify the
MaterialsBrandSection to use the same component for favorites, generic
and branded materials.

Contributes to CURA-5682.
2018-09-17 09:09:14 +02:00
Diego Prado Gesto
972f0bef43 WIP Fix an error in which the current selected material was not
correctly selected when there is more than one brand (stupid mistake).
Also fix problems when the user changes some material information.

Contributes to CURA-5682.
2018-09-14 10:54:07 +02:00
Diego Prado Gesto
6183a07d76 Activate the material right after it was created or duplicated.
Contributes to CURA-5682.
2018-09-12 16:35:01 +02:00
Diego Prado Gesto
921b11974c Improve the way the categories are highlighted.
When a material is selected, but the brand or the type is collapsed,
those components are also highlighted to indicate the path to the
material.

Reuse the MaterialBrandSection also for the generic materials, that
allow us to only mantain one component.

Contributes to CURA-5682.
2018-09-12 15:42:02 +02:00
Diego Prado Gesto
f298d37134 WIP: Moving current selected material to the material list instead of
the page.

Change all the previous references to the currentItem in the page.
Automatically and correctly select the element that is selected in the
extruder.

Contributes to CURA-5682.
2018-09-11 22:12:54 +02:00
Diego Prado Gesto
fe256b3562 Fix some issues in the material preference page.
Now the generic section collapses and expands correctly. Some qml error
was also fixed.

Contributes to CURA-5682.
2018-09-10 15:57:19 +02:00
Diego Prado Gesto
51b0497f84 Fix the collapsable panel of the Generic materials.
Contributes to CURA-5682.
2018-09-10 14:28:41 +02:00
Ian Paschal
9e56d6d29f Improved expansion behavior
Contributes to CURA-5682

- Active material is now expanded by default when opening the manager

- Expanded and collapsed sections are saved to preferences

- Sections are now highlighted when collapsed and having a selected material inside

- Bug with losing focus between fields is not yet fixed
2018-09-05 17:16:06 +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
13069a2f99 Some file renaming
Contributes to CURA-5378
2018-08-24 11:06:44 +02:00
Ian Paschal
93645e6bfe Reduce component sizes
Contributes to CURA-5378
2018-08-24 10:46: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
00eb8e6788 Organize material preferences
Contributes to CURA-5378
2018-08-22 12:34:38 +02:00