569 Commits

Author SHA1 Message Date
Lipu Fei
1967dd8404 Fix code style
CURA-6840
2019-10-07 08:12:54 +02:00
Lipu Fei
4579b06f6d Fix typing 2019-10-04 15:10:42 +02:00
Lipu Fei
3c4d29a814 Merge remote-tracking branch 'origin/feature_intent' into CURA-6840_intent_profile_visibility 2019-10-04 15:00:21 +02:00
Nino van Hooff
8d223c01d4 Add type annotation for layer_heights_added
CURA-6840
2019-10-04 14:07:57 +02:00
Nino van Hooff
88e0a57374 Fix typing and deduplicate fetch_layer_height
CURA-6840
2019-10-04 13:25:58 +02:00
Nino van Hooff
68f334e141 Fix: Consider all active extruder intent profiles for display.
Remove the notion of a singular 'active' extruder from the code.
Visibility of intent profiles should consider all enabled extruders.
This fix makes sure that it doesn't matter in what order materials are
loaded, the available intent profiles will be the same.

CURA-6840
2019-10-04 11:21:25 +02:00
Lipu Fei
a93fd982dd Fix renaming custom profile
CURA-6842
2019-10-02 23:59:48 +02:00
Lipu Fei
296f8af59c Always clear ListModel so layer height selector will align properly
CURA-6836
2019-10-01 16:15:36 +02:00
Lipu Fei
d1330e5ffa Fix updating custom quality menu model
CURA-6599
2019-09-25 14:36:46 +02:00
Lipu Fei
f2e518da6b Fix code style and typing 2019-09-25 08:23:57 +02:00
Lipu Fei
94e89ad4ac Fix merge conflicts with master 2019-09-24 14:26:43 +02:00
Lipu Fei
1aa6708677 Fix typing 2019-09-23 10:59:31 +02:00
Ghostkeeper
4a68e7ec95
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.
2019-09-20 09:57:36 +02:00
Jaime van Kessel
830b22e381
Fix crash when adding a machine without materials
CURA-6775
2019-09-19 15:12:29 +02:00
Jaime van Kessel
3e474c1107
Ensure that enabling & disabling an extruder gets handled correctly
CURA-6775
2019-09-19 14:54:58 +02:00
Jaime van Kessel
884a3ea819
Fix selection for intents if only one of the extruders has an intent
CURA-6598
2019-09-19 09:54:47 +02:00
Jaime van Kessel
78ab218cc2
No longer reset to default intent when configuration changed
This caused the intent to be reset every time a change was made.

CURA-6600
2019-09-18 14:52:51 +02:00
Ghostkeeper
2571f54d3c
Simplify looping over quality groups
Contributes to issue CURA-6600.
2019-09-18 14:01:23 +02:00
Ghostkeeper
0eb3c5c0d6
Refer material manager functions through to material management model
That's where the materials are duplicated now. So we only maintain one implementation of that.

Contributes to issue CURA-6600.
2019-09-17 17:50:38 +02:00
Ghostkeeper
5f4051ab5c
Use getApproximateMaterialDiameter instead of rounded getCompatibleMaterialDiameter
There was a function to round it for us already.

Contributes to issue CURA-6600.
2019-09-17 16:41:32 +02:00
Jaime van Kessel
0ff9d72c4c
Remove use of deprecated extruders property 2019-09-13 17:27:16 +02:00
Ghostkeeper
2cca95384d
Don't look for quality group for empty material
Just don't add it to the list of available intents then.

Contributes to issue CURA-6775.
2019-09-13 16:09:02 +02:00
Jaime van Kessel
55a8d03d42
Fix typing error 2019-09-13 13:16:48 +02:00
Ghostkeeper
f4a2f3efa6
Emit activeStackChanged as documented when containers in the active stack change
This fixes updating the intent models when you switch nozzles. Among other things, probably.

Contributes to issue CURA-6600.
2019-09-12 17:27:30 +02:00
Ghostkeeper
603f18ebc9
No need to sort quality groups by type alphabetically
Like, it would put 'draft' first and 'verydraft' last. Just makes no sense. They have unique layer heights already.

Contributes to issue CURA-6600.
2019-09-12 16:44:40 +02:00
Ghostkeeper
7d49fd7fa2
Don't import type that's only used for type checking
Contributes to issue CURA-6600.
2019-09-12 16:15:03 +02:00
Ghostkeeper
f1299589c9
Remove debug prints
Contributes to issue CURA-6600.
2019-09-12 15:49:27 +02:00
Ghostkeeper
cb146b586d
Emit ContainerRegistry's containerMetaDataChanged when name changes
If we properly call the setName() function on the container it'll emit the signal that the metadata changes.

This fixes the updating of the profiles list when you rename a container.

Contributes to issue CURA-6600.
2019-09-12 13:22:57 +02:00
Ghostkeeper
d6e010f22b
Fix iterating over all stacks
Contributes to issue CURA-6600.
2019-09-11 17:29:10 +02:00
Ghostkeeper
f865151e82
Don't create intent for global stack when duplicating
Contributes to issue CURA-6600.
2019-09-11 17:28:42 +02:00
Ghostkeeper
2b96543cd3
Store intent category in metadata of quality_changes as well
This is necessary in order to restore it properly.

Contributes to issue CURA_6600.
2019-09-11 16:58:11 +02:00
Ghostkeeper
0b92c3f3df
Use .container property rather than deprecated getContainer() function
Contributes to issue CURA-6600.
2019-09-10 14:56:16 +02:00
Lipu Fei
3f3aac7ce5
Merge pull request #6289 from Ultimaker/feature_intent_interface
Feature intent interface
2019-09-09 16:53:37 +02:00
Ghostkeeper
f8472d6414
Fix changing name of profiles in quality changes group
Because quality changes don't have nodes any more.

Contributes to issue CURA-6600.
2019-09-02 18:00:04 +02:00
Ghostkeeper
a1e6ba615c
Don't use isinstance to check for extruder stack vs. global
Just use the metadata available.

Contributes to issue CURA-6600.
2019-09-02 17:44:28 +02:00
Ghostkeeper
297b430712
Fix getting container registry
It's not in the fields of this class.

Contributes to issue CURA-6600.
2019-09-02 17:42:17 +02:00
Ghostkeeper
b5d32a9b70
Move createQualityChanges function to QualityManagementModel
This function is specific to the management page (for the most part; some things seem to call the _createQualityChanges private function nonetheless).

Contributes to issue CURA-6600.
2019-09-02 17:07:18 +02:00
Ghostkeeper
b05de3e6d8
Remove unused import
Contributes to issue CURA-6600.
2019-09-02 16:48:01 +02:00
Jaime van Kessel
b00b8c8c58 Merge branch 'feature_intent_container_tree' of github.com:Ultimaker/Cura into feature_intent_interface 2019-08-29 16:28:26 +02:00
Jaime van Kessel
d548404dfd Fix typing issues 2019-08-29 16:23:10 +02:00
Jaime van Kessel
de1065f0a3 Prevent crash if extruder is not yet set
CURA-6598
2019-08-29 14:04:05 +02:00
Jaime van Kessel
ba0c16d968 Update intents model to use container tree
CURA-6598
2019-08-29 13:53:23 +02:00
Jaime van Kessel
f4dc93fc39 Prevent crash in model if no extruder is set
CURA-6598
2019-08-29 11:57:03 +02:00
Jaime van Kessel
5401a4db15 Ensure that each intent gets it's own bar in recommended
CURA-6598
2019-08-29 11:53:19 +02:00
Jaime van Kessel
24d6d5b102 Update intent models to also house nested qualities
CURA-6598
2019-08-29 11:45:19 +02:00
Ghostkeeper
9614cef135
Move duplicateQualityChanges to QualityManagementModel
This is specific to the quality management page, so moving it here prevents QualityManager from becoming a big ball of spaghetti again.

Contributes to issue CURA-6600.
2019-08-29 09:02:18 +02:00
Ghostkeeper
b046ff6683
Fix updating quality management page profile list
When a custom profile gets added, deleted or renamed we need to update our model.

Contributes to issue CURA-6600.
2019-08-28 16:54:41 +02:00
Ghostkeeper
a7e5830762
Fix case if containers are None
This happens when the number of containers was resized.

Contributes to issue CURA-6600.
2019-08-28 16:50:14 +02:00
Ghostkeeper
5d8fff69e4
Fix referencing nodes for quality changes
Contributes to issue CURA-6600.
2019-08-28 16:32:20 +02:00
Ghostkeeper
5fadc7019d
Move renameQualityChangesGroup to QualityManagementModel
Contributes to issue CURA-6600.
2019-08-28 16:31:50 +02:00