49 Commits

Author SHA1 Message Date
Lipu Fei
89cb67017f Add unit test for addDefaultMachineActions()
CURA-5812
2018-10-23 08:49:23 +02:00
Lipu Fei
fe8aa02e7c Fix a direct signal emission that causes max recursion error
CURA-5682

A max recursion error will occur when the user creates a material on the
material management page. Too many signals get directly triggered and
some of them head back again and causes a max recursion error.
2018-09-24 11:44:55 +02:00
Lipu Fei
c20274e356 Move constant instance containers to a separate file
This way we separate the class/type definitions and the actual
constants.
2018-08-15 11:04:09 +02:00
Diego Prado Gesto
c8af4f45ce Decouple the creation of the stack containers from the process that add
them to the container registry, that is done in CuraApplication.

That allow us to have access to the empty containers and so we can unit
test easily without mocking up stuff.

Contributes to CURA-5628.
2018-08-14 13:25:56 +02:00
Lipu Fei
af02dc2758 Only use setMetaDataEntry() 2018-07-11 11:14:57 +02:00
Diego Prado Gesto
f91b6faecc Fix code-styling 2018-07-03 17:57:30 +02:00
Diego Prado Gesto
762a1b1bfd Fix code-style 2018-07-03 12:06:06 +02:00
Ghostkeeper
b331736cb2
Let _findInstanceContainerDefinitionId work with DefinitionContainerInterface
But where it needs the .id field it needs to ignore this type because this works with getattr weirdness.

Contributes to issue CURA-5330.
2018-06-14 09:58:16 +02:00
Ghostkeeper
eac3c759cd
Cast each container in their stack to actual types
We know for sure that these containers have those types. We'll accept the risk here that this assumption was wrong.

Contributes to issue CURA-5330.
2018-06-14 09:58:07 +02:00
Ghostkeeper
b920b9de4f
Fix type of setProperty
And properly pass on the extra parameters.

Contributes to issue CURA-5330.
2018-06-01 14:53:54 +02:00
Ghostkeeper
e38228ac24
Remove unused target_container parameter
It's not compatible with ContainerInterface anyway.

Contributes to issue CURA-5330.
2018-06-01 14:53:54 +02:00
Ghostkeeper
e77592d718
Add missing typing for CuraContainerStack
This was already largely done, but not 100%.

Contributes to issue CURA-5330.
2018-06-01 14:53:13 +02:00
Ghostkeeper
2fbcc22123
Fix adding printers due to unused 'parent' parameter
The 'parent' parameter was unused, so I removed it. But I didn't remove all things that called it, apparently. I just removed some. I didn't try the stackbuilder.

Contributes to issue CURA-5330.
2018-06-01 14:02:32 +02:00
Lipu Fei
df1e15b1e5 Move the definition_changes fix to CuraContainerStack
CURA-5281
2018-04-25 16:12:47 +02:00
Jack Ha
bd775cf32e CURA-4400 fix support_extruder_nr values in overhang angle and SliceInfo 2018-03-19 10:56:40 +01:00
Lipu Fei
f4d69918fb WIP: Remove findDefault..()s 2018-02-16 14:23:11 +01:00
Lipu Fei
12164a0c88 WIP: Remove set..ById()s in CuraContainerStack 2018-02-16 14:23:11 +01:00
Jack Ha
8aab8f4394 CURA-4606 cleanup and optimization for replaceContainer 2018-02-16 14:23:11 +01:00
Diego Prado Gesto
e5e6da2970 Change comments 2018-01-11 09:49:07 +01:00
Diego Prado Gesto
3a01a407cf CURA-4461 Set default variant builplate when the new printer is added 2018-01-11 09:16:11 +01:00
Diego Prado Gesto
ff10af905c CURA-4461 Add code to set the default preferred buildplate when adding a
new machine that has different buildplates.
2018-01-10 16:04:30 +01:00
Aleksei S
2c18127cc1 Tests: Removed python circular import dependency and added empty containers
CURA-4687
2017-12-15 09:43:02 +01:00
Lipu Fei
6e6dc493f1 Fix material loading for unknown names 2017-12-13 12:27:55 +01:00
Jack Ha
ce78bddfbb Prefer a read-only material in findDefaultMaterial.
Contributes to CURA-4243.
2017-12-05 09:51:57 +01:00
Ghostkeeper
dad99f5292
Merge branch 'master' into feature_local_container_server
Contributes to issue CURA-4243.
2017-11-29 13:06:08 +01:00
Lipu Fei
c7667b56e2 Multiple fixes for stacks
CURA-4617
2017-11-24 09:45:59 +01:00
Lipu Fei
17f09ec21e Fix variant/material/quality handling in stacks
CURA-4613
2017-11-23 12:46:33 +01:00
Lipu Fei
18c7a5acf3 Pass optional file_name for deserialization
CURA-4613

Some upgrades depend on the file_name, so the file_name is needed in
this case.
2017-11-23 11:28:16 +01:00
ChrisTerBeke
657a91c525 Merge pull request #2685 from Ultimaker/container_stack_improvements
Container stack improvements
2017-11-20 17:42:26 +01:00
Ghostkeeper
6c4c7fff4d
Use findContainersMetadata whenever possible
This ensures that we only load those containers that we actually need the data of.

Contributes to issue CURA-4243.
2017-10-20 15:09:45 +02:00
Mark
9a193ad5c5 Changing AGPLv3 to LGPLv3 2017-09-28 13:00:43 +02:00
fieldOfView
43c6801e58 Find a material with the correct diameter when adding a printer 2017-08-20 16:52:56 +02:00
Ghostkeeper
012d299d98
Prevent circular import
When this is imported during the __init__, it'll long have been imported elsewhere and won't need to import it again but still guarantees that it is actually imported if no other module does it first.

Contributes to issue CURA-4024.
2017-07-10 16:42:38 +02:00
Ghostkeeper
f0d327c0d0
Set setting_version properly on new stacks so you don't need to upgrade
I don't think stacks had a setting_version property previously.

Contributes to issue CURA-4024.
2017-07-10 11:22:35 +02:00
Lipu Fei
8af1cc886f Use .definition to access DefinitionContainer in qml
CURA-3810
2017-05-30 12:49:12 +02:00
Jaime van Kessel
fb6d86dc88 Also override getTop(), as curaContainerStack enforces it being a instanceContainer
This helps with the type hinting.
2017-05-12 16:39:24 +02:00
Jaime van Kessel
7ee5a66c64 CuraContainerStack now overrides getBottom, so it always returns a definition 2017-05-12 16:32:00 +02:00
Jaime van Kessel
e313794b12 Fixed posponing of certain events
CURA-3780
2017-05-10 13:16:49 +02:00
Jaime van Kessel
19bc6bb710 All error checks now use the timer instead of re-checking multiple times.
This significantly speeds up all setting / container changes for multi extrusion machines

CURA-3780
2017-05-09 14:38:57 +02:00
Arjen Hiemstra
aad623fab6 Correct a typo in CuraContainerStack::findDefaultQuality
Contributes to CURA-3497
2017-05-03 13:16:19 +02:00
Jaime van Kessel
4bdbe42dcb Fixed type hinting issues
CURA-3497
2017-05-02 11:21:17 +02:00
Jaime van Kessel
69c3baf87f Fixed unit test
CURA-3497
2017-05-02 11:06:25 +02:00
Jack Ha
c91bc015e4 Removed unused variables. CURA-3497 2017-04-25 08:43:44 +02:00
Jack Ha
765ddefd7f Reverse lookup TypeIndexMap is now also a dict. CURA-3497 2017-04-24 16:09:00 +02:00
Arjen Hiemstra
ab1044de7b Some more documentation 2017-04-19 14:41:32 +02:00
Arjen Hiemstra
0a0353da82 Move code to set default variant/material/quality to CuraContainerStack
This allows us to eventually make sure everything uses the same code.
2017-04-18 17:41:48 +02:00
Arjen Hiemstra
8682eb1486 Document CuraContainerStack 2017-04-18 17:40:12 +02:00
Ghostkeeper
07d64f2335
Report the type that was found when replacing containers
Makes it easier to debug.

Contributes to issue CURA-3497.
2017-04-10 11:18:02 +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