Commit graph

993 commits

Author SHA1 Message Date
Jaime van Kessel
eded0f0297 Make quality manager also include profiles with same GUID in fallback.
This ensures that if a (duplicated) material does not have a generic variant, that
the material it was copied from will be added to the fallback list.

CURA-5898
2018-11-05 11:17:39 +01:00
Jaime van Kessel
90726ecbff Fix situation where the setting visibility model could cause a crash.
Yay for crash logging
2018-11-01 15:28:08 +01:00
fieldOfView
7899b249fc Use preferred material instead of generic PLA when creating a new material 2018-10-28 12:12:14 +01:00
Remco Burema
fb9d85557e Missed one of the getCompatibleMaterialDiameter typo's in the previous commit.
part of [CURA-5834]
2018-10-23 13:57:42 +02: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
Jaime van Kessel
4c5bf3297c Merge branch 'master' of github.com:Ultimaker/Cura into CURA-5734-rework-and-unit-test-setting-visibility-preset 2018-10-17 10:49:29 +02:00
Jaime van Kessel
d086e6fa86 Fix review comments
CURA-5734
2018-10-17 10:47:34 +02:00
Ghostkeeper
b37252f124
Minor code style fixes
Contributes to issue CURA-5734.
2018-10-10 14:18:37 +02:00
Jaime van Kessel
dabe747ec0 Merge branch 'CURA-5744-move-oauth-login' of github.com:Ultimaker/Cura 2018-10-03 13:25:09 +02:00
Lipu Fei
b97f4ea30c Merge remote-tracking branch 'origin/3.5' 2018-10-03 11:49:38 +02:00
Lipu Fei
c3e7e426ff Fix getDefaultVariantNode for UM2
CURA-5790

UM2 has optional variant which depends on whether Olsson Block is
enabled. getDefaultVariantNode() should take that into account.
2018-10-03 11:24:27 +02:00
Jaime van Kessel
4def636fc9 Minor codecleanup (Typing & removing unused imports)
CURA-5734
2018-10-01 14:54:08 +02:00
Jaime van Kessel
edb5de9954 Added unit test for settingvisibility presets
CURA-5734
2018-10-01 14:50:53 +02:00
Jaime van Kessel
7e7afa7c06 Ensure that the SettingVisibilityPresetsModel doesn't have duplicated settings
CURA-5734
2018-10-01 11:51:07 +02:00
Jaime van Kessel
fc9f05fc8b Moved SettingVisibilityPreset loading to it's own class
Since there was so much debate regarding the unit testing of the visiblity presets, i had another look at it.
The old version was almost untestable because all functionalities were mushed together into a single class.

CURA-5734
2018-10-01 11:32:55 +02:00
Lipu Fei
7ae6800a14 Fix imports in QualityManager 2018-09-28 14:01:28 +02:00
Jaime van Kessel
3b70e5eb6b Fix typing
For some reason, my MyPy started acting up once I started using the PythonPath while calling it.
2018-09-27 20:01:55 +02:00
Jaime van Kessel
7310a677ce Clean up more code
This fixes some typing and moves a property to protected, as it should be
2018-09-27 16:07:18 +02:00
Ghostkeeper
c46e0e7556
Only print message about excluded materials if there are any
Otherwise the message is very strange (with double spaces and such) and unnecessary.
2018-09-24 11:59:02 +02:00
Ghostkeeper
b26c78202b
Consolidate log entries about excluded materials
I got a log where 80% of the log was this particular message. Let's not do that.
2018-09-21 13:11:12 +02:00
Ghostkeeper
c6fa9474d6
Merge branch '3.5' 2018-09-17 14:41:45 +02:00
Aleksei S
f0e8746a22 Code style, duplicate material
CURA-5673
2018-09-13 13:23:10 +02:00
Aleksei S
5db008f763 New duplicated favorite material will be added to favorite category
CURA-5673
2018-09-13 12:56:51 +02:00
Diego Prado Gesto
7e1a833e9c Merge branch '3.5' into CURA-5682_material_manager_leftovers 2018-09-12 17:12:40 +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
Diego Prado Gesto
a909c8f029 Don't emit signal if the favorite list didn't change.
Contributes to CURA-5682.
2018-09-11 22:05:39 +02:00
Jaime van Kessel
c84a2213a7 Merge branch '3.5' of github.com:Ultimaker/Cura 2018-09-11 11:01:55 +02:00
Jaime van Kessel
729d78e14a Updated another set of typing 2018-09-10 16:08:31 +02:00
Jaime van Kessel
e7d9f0ce45 Added typing for various setting classes 2018-09-10 15:24:11 +02:00
Lipu Fei
d8421105d4 Fix quality lookup
CURA-5694

For a machine, if it has extruder-specific qualities, when we look up
extruder qualities, we should NOT fall back to use the global qualities.
2018-09-10 14:39:10 +02:00
Lipu Fei
d01ec7872d Fix quality lookup
CURA-5694

For a machine, if it has extruder-specific qualities, when we look up
extruder qualities, we should NOT fall back to use the global qualities.
2018-09-10 14:23:46 +02:00
Lipu Fei
9aea0e5109 Fix quality lookup logic for extruders
CURA-5694

 - Add convenience functions into GlobalStack
 - Use "has_variants" and "has_materials" instead of
 "has_variant_materials"
 - Remove "has_variant_materials"
 - For extruder qualities, skip global qualities if the machine has
   variants or materials
2018-09-06 08:12:55 +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
Lipu Fei
ab572e9de2 SettingFunction evaluation needs a stack to provide values
Note that this is still not correct. When the value gets evaluated, we
need to evaluate it with that container in the stack(s), but this case,
the stack may have other containers, so the evaluation can give
incorrect values because its context is simply not correct. This change
only prevents it from breaking because it's missing a provider.
2018-09-03 14:03:46 +02:00
Ghostkeeper
6df029971d
Don't crash if layer height is a formula
We obtain the layer height here but that might be a formula so we should evaluate that formula here.

Fixes #4005.
2018-09-03 11:02:24 +02:00
Lipu Fei
e0aea18177 Reset machines that use a removed quality changes
CURA-5675

When a custom quality gets removed, Cura should reset all machines which
use this custom quality to default.
2018-08-29 11:42:45 +02:00
Lipu Fei
40c4e9c5df Fix KeyError color_code in BaseMaterialsModel 2018-08-28 09:56:00 +02:00
Ian Paschal
d097b06479
Merge pull request #4284 from Ultimaker/CURA-5668_fix_quality_fallback
CURA-5668 Fix quality lookup fallback mechanism
2018-08-27 11:58:18 +02:00
Lipu Fei
33f495442a Remove unneeded code
CURA-5162
2018-08-27 10:44:41 +02:00
Lipu Fei
8daf02063d Fix quality lookup fallback mechanism
CURA-5668

The last fallback is the global qualities, either machine-specific or
generic, but not using both. Because if a machine defines its own global
qualities, it is intended to override the existing ones, so do not
fallback again in this case.
2018-08-24 15:35:03 +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
8da7773600 Remove unused code
Contributes to CURA-5162, CURA-5378
2018-08-23 16:04:51 +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
08b325ee04 Correctly load material favorites from preferences
Contributes to CURA-5378, CURA-5162
2018-08-22 12:31:48 +02:00
Ian Paschal
6d1fd8281c Add favorites funcitonality to MaterialManager.py
Contributes to CURA-5378
2018-08-20 17:17:14 +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
Ian Paschal
e8cda90021 Add favorites to materials menu
Contributes to CURA-5162
2018-08-16 13:04:58 +02:00