1040 Commits

Author SHA1 Message Date
Arjen Hiemstra
6827849220 Un-deprecate activeMachine{Name,Id}
Since it provides too much noise and I do not want to change the code
that uses it right now.
2017-04-06 17:50:05 +02:00
Arjen Hiemstra
433537a2f0 Add type metadata to Extruder/Global stack
For backward compatibility with old code that still checks for "type".
2017-04-06 17:49:22 +02:00
fieldOfView
0c74b4d108 Don't create extruder tabs for "inactive" extruders
If a printer definition defines more extruders than machine_extruder_count, these are no longer shown as tabs in the sidebar.
2017-04-06 09:41:15 +02:00
Arjen Hiemstra
608e62e081 Do not try to get resolve when extruder count == 1 or for nonexistant properties 2017-04-06 02:22:45 +02:00
Arjen Hiemstra
1c75a82779 Fix the hacked "getResolveOrValue" to return value always instead of resolve 2017-04-06 02:21:39 +02:00
Arjen Hiemstra
d3d2bdfaeb getResolveOrValue has become obsolete now that stack.getProperty can return a resolve 2017-04-04 17:41:43 +02:00
Arjen Hiemstra
a16b5d73b6 Partial fix for infinite recursion when trying to call getProperty 2017-04-04 17:41:21 +02:00
Arjen Hiemstra
82333a244b Add some initial code to use the new classes to create new machines 2017-04-04 17:40:58 +02:00
Arjen Hiemstra
cbc19b13eb Deprecate the activeMachineName/Id properties in favour of activeMachine 2017-04-04 17:40:34 +02:00
Arjen Hiemstra
7eb5441ebc Add an "activeMachine" property to MachineManager
Directly exposes the global container stack to QML.
2017-04-04 17:39:57 +02:00
Arjen Hiemstra
47a388fd2c Introduce a CuraStackBuilder class
It contains factory functions for creating new stacks with certain
quality/material/variant combinations.
2017-04-04 17:38:49 +02:00
Lipu Fei
db1c6e4163 Merge pull request #1649 from Ultimaker/fix_setting_speed
Fix delays when settings change from error to valid
2017-04-04 14:33:44 +02:00
Arjen Hiemstra
7015702832 Add a change timer to perform the error state checking
This pulls the checkStackHaveErrors code out of the critical path when
editing settings, instead moving it to be handled later. This greatly
reduces the delay that happens when editing settings.

Fixes CURA-3653
Contributes to #1631
2017-04-04 13:39:18 +02:00
Jaime van Kessel
6314d872e1 If we find multiple materials for a new extruder, prefer a read only material
CURA-3147
2017-03-30 16:07:26 +02:00
Arjen Hiemstra
1f0f8cd6ea Make GlobalStack a subclass of CuraContainerStack 2017-03-30 08:58:21 +02:00
Arjen Hiemstra
202f19a081 Make ExtruderStack a subclass of CuraContainerStack 2017-03-30 08:58:05 +02:00
Arjen Hiemstra
d4400b8674 Introduce a CuraContainerStack that has all the code shared between global and extruder
Since there is actually quite a lot of it
2017-03-30 08:57:37 +02:00
Arjen Hiemstra
317576e983 Set container entry to empty if it was not found in the original container 2017-03-28 18:14:16 +02:00
Arjen Hiemstra
75931192f6 Allow setting Definition and setting Definition by ID
To match the other properties
2017-03-28 17:46:28 +02:00
Arjen Hiemstra
123c8bae45 Allow setting userChanges container
Since that makes it possible to create an external factory method for
creating stacks and makes the properties more consistent.
2017-03-28 17:46:00 +02:00
Arjen Hiemstra
2f6936c961 Fix type checking in GlobalStack 2017-03-28 17:45:15 +02:00
Arjen Hiemstra
4cea1b6d33 Fix error case in addExtruder
Error out when the new size is going to be more than extruderCount
instead of whether it currently is more than extruderCount.
2017-03-28 17:44:29 +02:00
Arjen Hiemstra
4005f5082b Allow setting of properties on GlobalStack 2017-03-28 17:43:11 +02:00
Arjen Hiemstra
b6fafb06ed Ensure we initialize the list of containers for GlobalStack 2017-03-27 17:52:38 +02:00
Arjen Hiemstra
39803cf7dd Add missing imports to Extruder/GlobalStack 2017-03-27 17:52:16 +02:00
Arjen Hiemstra
5196ea695c Add a notify signal to all container properties in GlobalStack
Contributes to CURA-3497
2017-03-27 01:35:34 +02:00
Arjen Hiemstra
dd8ea6175c Add properties for user changes etc. to ExtruderStack 2017-03-27 01:32:36 +02:00
Arjen Hiemstra
de1dbfbc07 Override replaceContainer and add some type checking
type in this case being container type

Contributes to CURA-3497
2017-03-23 17:55:21 +01:00
Arjen Hiemstra
dc0c666a54 Disable add/insert/remove container
Since we want to have a fixed list of containers in the stack.

Contributes to CURA-3497
2017-03-23 17:55:21 +01:00
Arjen Hiemstra
5ad0651fd1 Add an "extruders" property and an addExtruder method
Contributes to CURA-3497
2017-03-23 17:55:21 +01:00
Arjen Hiemstra
462d5fac8d Add setters for properties
Contributes to CURA-3497
2017-03-23 17:55:21 +01:00
Arjen Hiemstra
f97a6ebd74 Move exceptions to their own file
Since that keeps the GlobalStack cleaner

Contributes to CURA-3497
2017-03-23 17:55:21 +01:00
Arjen Hiemstra
411e3a3976 Fix up a bunch of things with type hints and imports 2017-03-21 17:45:07 +01:00
Arjen Hiemstra
88e8138004 Override ContainerStack::deserialize
This ensures we have the right set of containers in the stack
2017-03-21 17:44:36 +01:00
Arjen Hiemstra
95a6bef50f Add properties for the individual containers in the global stack 2017-03-21 17:43:42 +01:00
Arjen Hiemstra
37b4326e99 Mark addContainer as override 2017-03-21 17:43:14 +01:00
Arjen Hiemstra
f32f8b60df Explictly import Extruder/Global stack
For some reason, things were not being imported properly. This fixes
that.
2017-03-21 17:42:57 +01:00
Arjen Hiemstra
3ee3e0aee3 Add a private class to GlobalStack that defines the expected indices of each container type 2017-03-21 17:39:06 +01:00
Jaime van Kessel
90a92dce19 If a container_changes can not be found, handle it more gracefully
CURA-3560
2017-03-21 13:23:50 +01:00
Arjen Hiemstra
4904e449a0 Start overriding getProperty in GlobalStack
Since we have the "resolve" property, we should transparently handle it
so lookup can just use "value".

Contributes to CURA-3497
2017-03-20 17:30:00 +01:00
Arjen Hiemstra
0656dd53c3 Override setNextStack in GlobalStack and raise an error if called
Since the global stack should never have a next stack

Contributes to CURA-3497
2017-03-20 17:28:42 +01:00
Arjen Hiemstra
b9f01b30c8 Convert generic "ContainerStack" to an Extruder or Global stack
Dependendant on the "type" metadata key, we create either an
ExtruderStack or a GlobalStack instance to replace the ContainerStack
instance. This should allow for transparent upgrades to the new classes.

Contributes to CURA-3497
2017-03-20 17:28:01 +01:00
Arjen Hiemstra
12c50dbac8 Introduce a GlobalStack class
This will allow us to codify some of the assumptions made about the
global stack

Contributes to CURA-3497
2017-03-20 17:26:12 +01:00
Arjen Hiemstra
3b0fdecb60 Introduce an ExtruderStack class
This will allow us to codify some of the assumptions made about
extruders.

Contributes to CURA-3497
2017-03-20 17:22:11 +01:00
Ghostkeeper
2f1d957f99
Split support_interface_enable into roof and bottom
You can activate the roof and bottom separately now. If you want, of course. The original interface setting sets both of them unless overwritten.

Contributes to issue CURA-3491.
2017-03-20 10:47:37 +01:00
Ghostkeeper
2d9b2216a3
Allow printing support roof and bottom with different extruders
Note that currently the support_interface_extruder_nr is still used by the engine for some things and therefore the build volume calculations may not be 100% correct. I'll fix that up soon.

Contributes to issue CURA-3491.
2017-03-17 15:55:18 +01:00
Jack Ha
32d5fbe557 Fixed choosing a quality that is compatible with multiple extruders as fallback. CURA-3510 2017-03-13 17:17:56 +01:00
Lipu Fei
55727f20e5 CURA-3507 Make quality lookup more robust 2017-03-13 09:45:23 +01:00
Lipu Fei
8b8fb8db95 Coding style fixes 2017-03-08 15:09:02 +01:00
Lipu Fei
5724ee71d0 CURA-3221 Group items into categories for the profile change summary 2017-03-08 15:08:45 +01:00