142 Commits

Author SHA1 Message Date
Jaime van Kessel
b165b9625f Removed unused code and fix styling for some comments 2019-02-22 15:08:51 +01:00
Ghostkeeper
27aff4e5da
Fix typing issues
Because this function now has typing, it's raising a load of issues with it.

Contributes to issue CURA-5929.
2018-11-12 12:48:49 +01:00
Ghostkeeper
9c555bf67f
Add typing and always add error message if loading failed
There were some places where it would return None. Then in the QML it would give a QML error that the null object has no dictionary items.

Contributes to issue CURA-5929.
2018-11-12 11:02:43 +01:00
Ghostkeeper
4c6744b6fc
Code style: Space around binary operators
I just looked for lines with interpolation = None because I was looking for another possible bug, but fixing this in the meanwhile too.
2018-10-10 14:28:50 +02:00
Ghostkeeper
314b966cc9
Improvements to translated strings
These strings were recently found to have been confusing to the translators. Improvements are:
- Pulling the (untranslated) error message out of the message sentence. We really want the error message to be at the end so we'll force the translators to translate it as a prefix.
- Remove extra spaces at the end.
- Remove Python logic from within the i18nc call, since gettext doesn't understand that.

Contributes to issue CURA-5741.
2018-10-08 15:03:21 +02:00
Lipu Fei
af02dc2758 Only use setMetaDataEntry() 2018-07-11 11:14:57 +02:00
Diego Prado Gesto
2dfedf3ae4 CURA-5330 Add typing in CuraContainerRegistry and
QualityProfilesDropDownMenuModel
2018-06-08 17:02:59 +02:00
Diego Prado Gesto
e5e96bc600 Merge branch 'master' into mypy_fixes
Contributes to CURA-5330
2018-06-08 15:29:22 +02:00
Lipu Fei
e518d07f5a No need to give parent to ExtruderStack 2018-06-04 13:22:08 +02:00
Ghostkeeper
f544e3d5c0
Fix @override decorator
They need a parameter and they need to be the last decorator.

Contributes to issue CURA-5330.
2018-06-04 09:02:57 +02:00
Ghostkeeper
5a5d07865b
Fix circular imports with CuraApplication
Contributes to issue CURA-5330.
2018-06-04 09:01:30 +02:00
Ghostkeeper
c3bac474ab
Use CuraContainerRegistry instead of ContainerRegistry
Because we're calling functions of CuraContainerRegistry.

Contributes to issue CURA-5330.
2018-06-01 16:33:32 +02:00
Lipu Fei
9a5fb47a6e Merge master into material marketplace 2018-05-01 11:56:34 +02:00
Diego Prado Gesto
27b1e2cdd6 Fix format and add error message to log. Contributes to CURA-5301 2018-04-26 15:49:18 +02:00
Lipu Fei
4615c756a7 More clear error handling for container deserialization
CURA-5045

 - If a container cannot be deserialized in project loading, it should fail
   right on the spot because even if it continues, it still won't work.
 - In other places, at least log deserialization errors if any of them show
   up.
2018-04-09 14:51:05 +02:00
Ghostkeeper
572721e20d
Catch ContainerFormatError when deserialising containers
Only the deserialize() functions themselves may pass the ContainerFormatError on, because their callers will have to handle those errors anyway.

Contributes to issue CURA-5045.
2018-04-06 13:26:16 +02:00
Lipu Fei
e36ef583b7 Minor changes and cleanup 2018-04-05 15:14:15 +02:00
Lipu Fei
19bc2b78f4 Add Version upgrade 3.3 to 3.4
Need to distinguish between quality and quality_changes in the cura directory,
so we need to move all custom quality profiles into the quality_changes directory.
2018-04-05 15:14:15 +02:00
Lipu Fei
c3fe53123b Create module cura.ReaderWriters
CURA-4644

Move all reader writer classes into cura.ReaderWriters.
2018-04-05 15:14:15 +02:00
Lipu Fei
f15771856f Add parent for stacks and containers that are created 2018-03-27 15:03:11 +02:00
Jack Ha
04a135e6a3 CURA-5157 renamed extruder to position in addExtruderStackForSingleExtrusionMachine, fixes loading some upgrades from 3.0 2018-03-27 13:04:05 +02:00
Lipu Fei
08f43f6b2e Fix profile ordering in profile importing
CURA-5054
2018-03-15 15:27:47 +01:00
Lipu Fei
22573a685d Fix quality definition comparison in quality importing
CURA-4946
2018-03-14 14:31:30 +01:00
Lipu Fei
0655ef0bc5 Fix quality profile import
CURA-4946
2018-03-14 14:22:46 +01:00
Lipu Fei
191faaba19 Fix machine definition in quality importing
CURA-4946
2018-03-14 13:49:16 +01:00
Ian Paschal
05c59ddaa7 CURA-4946 Handle gcode with wrong quality definition
Some gcode has its quality definition set to, say, UM2 extended, which is _actually_ just UM2 gcode. Thus, we check if the definition in the profile matches the current machine or what it in theory should be, either one being valid. See comments in code for details.
2018-03-14 13:29:48 +01:00
Ian Paschal
6d2d9c8fe2 CURA-4946 Fixed typo 2018-03-13 12:39:10 +01:00
Lipu Fei
1f08accbec Fix profile importing for version upgrade
CURA-4946
2018-03-12 16:15:16 +01:00
Lipu Fei
a81981a27a Better info on no profiles to import for gcode
CIRA-4946

If a gcode is sliced with default profiles, there won't be any custom
profiles to import from that gcode. In that case, we show a info message
telling the user about this instead of showing an error message.
2018-03-09 16:40:57 +01:00
Lipu Fei
07824c21e1 Move getMachineDefinitionIDForQualitySearch() into QualityManager.py 2018-02-28 11:48:20 +01:00
Lipu Fei
9a354efd19 Merge remote-tracking branch 'origin/master' into refactoring_machine_manager 2018-02-21 14:05:19 +01:00
Diego Prado Gesto
6af5a5d4bc CURA-4946 When storing the gcode profile, the definition must be the
quality definition if the printer has_machine_quality. Otherwise the
fdmprinter definition must be used as a fallback. If there is no
quality_definition then the printer definition is use.
2018-02-20 11:11:21 +01:00
Diego Prado Gesto
6a4f519238 Revert "CURA-4946 Add the quality_definition metadata entry to the gcode so when"
This reverts commit 744313af273ed34a5796d3970c3915f68abaedc7.
2018-02-20 09:30:05 +01:00
Lipu Fei
62c31c2f6c WIP: Remove old QualityManager 2018-02-19 22:11:47 +01:00
Lipu Fei
27f7d16a57 WIP: Make import/export profile work 2018-02-19 21:47:12 +01:00
Lipu Fei
0c3ac090c9 WIP: Cleanup 2018-02-19 21:11:01 +01:00
Jack Ha
aed0c124e9 CURA-4606 improved addExtruderStackForSingleExtrusionMachine by using containers directly 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
Diego Prado Gesto
744313af27 CURA-4946 Add the quality_definition metadata entry to the gcode so when
parsing, the quality definition is taken into account instead of the
definition.
The message when importing a profile to a different machine,
now shows the expected machine and the current machine definition id.!!
2018-02-16 14:01:46 +01:00
Diego Prado Gesto
735dac6a4a Modify debug message to show the correct/useful information 2018-02-16 09:15:06 +01:00
Jack Ha
98f925d50c CURA-4924 now creating the extruder container with metadata extruder 2018-02-07 10:00:02 +01:00
Jack Ha
cb6b465ce7 CURA-4924 fix loading profiles with % in it 2018-02-07 09:55:22 +01:00
Diego Prado Gesto
4cf07f5fe6 CURA-4868 Fix typo 2018-01-30 17:23:55 +01:00
Lipu Fei
759e596eb6 Fix add extruder function
CURA-4868
2018-01-30 12:19:16 +01:00
Lipu Fei
f1363fab73 Move newline format
CURA-4863
2018-01-29 16:33:52 +01:00
Lipu Fei
924f3972fd Create quality_changes for extruder stack if missing in profile importing
CURA-4868
2018-01-29 14:50:08 +01:00
Lipu Fei
34e6816f83 Fix container ID modification in profile importing
CURA-4868
2018-01-29 14:50:07 +01:00
Lipu Fei
7dfc1a4aa7 Add encoding='utf-8' for text file reading
CURA-4875

When encoding is not provided, the behaviour is system dependent and it
can break on OS X.
2018-01-29 12:29:20 +01:00
Diego Prado Gesto
e38cf957bb CURA-4839 Avoid creating unique names for the extruder instance
containers if the strategy is upgrade existing
2018-01-24 16:04:11 +01:00
Lipu Fei
1c605a5108 Fix different strategies for machine and quality in project loading
CURA-4839
2018-01-23 10:58:43 +01:00