Commit graph

1761 commits

Author SHA1 Message Date
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
Diego Prado Gesto
c0c66649b8 Merge branch '3.5' 2018-10-02 20:27:18 +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
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
f69005fef9 Rename to CuraFormulaFunctions
to avoid confusion with "SettingFunction" in Uranium.
2018-10-01 11:24:34 +02:00
fieldOfView
09742f0cf5 Simplify code 2018-09-28 13:09:59 +02:00
fieldOfView
a12c0e8d9e Remove superfluous import 2018-09-28 11:51:33 +02:00
fieldOfView
bc52830c89 Move getDefaultFirmwareName() into GlobalStack 2018-09-28 11:49:00 +02:00
fieldOfView
9a98341bda Fix code-style and typing 2018-09-28 11:38:42 +02:00
fieldOfView
7c23a4e187 Merge branch 'master' into feature_firmware_updater 2018-09-28 11:32: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
f585afe77b Fix spacing 2018-09-27 17:31:45 +02:00
Lipu Fei
329b38663e Fix code style 2018-09-27 11:44:10 +02:00
Lipu Fei
b1198ee1b8 Remove an if-else block that assumes no ExtruderStack
There is always an ExtruderStack, so the else-block will never be
executed.
2018-09-27 11:44:10 +02:00
Lipu Fei
3c8368827b Remove unused functions in ExtruderManager 2018-09-26 17:04:15 +02:00
Lipu Fei
7a681a2ae4 Move Cura custom setting functions to a separate file 2018-09-26 16:54:00 +02:00
Lipu Fei
91bcfb9445 Take in account extruders that haven't been loaded yet
CURA-5751
2018-09-25 15:29:31 +02:00
Diego Prado Gesto
e31f35ec95 Merge branch '3.5' 2018-09-25 09:36:08 +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
3b62284276 Merge remote-tracking branch 'origin/3.5' 2018-09-18 16:15:55 +02:00
Diego Prado Gesto
e28b662649 Clean up the code a bit and update comments.
Contributes to CURA-5736.
2018-09-18 16:04:31 +02:00
Lipu Fei
9924e3e26c Remove duplicated code
CURA-5735
2018-09-18 15:08:55 +02:00
Lipu Fei
ddc5d983a1 Fix single extrusion machines without an ExtruderStack
CURA-5736
2018-09-18 13:35:25 +02:00
Ghostkeeper
9e21af65b4
Merge branch '3.5' 2018-09-17 10:54:44 +02:00
Ghostkeeper
8a94042a1f
Fix icon name role
The icons were not displaying in the context menu of the settings.
2018-09-17 10:51:56 +02:00
Ghostkeeper
a870060a34
Remove unused parameter 2018-09-14 17:00:55 +02:00
Ghostkeeper
e9ac0e5564
Merge branch '3.5' 2018-09-14 12:41:35 +02:00
Ghostkeeper
fb9c21e914
Fix imports 2018-09-14 12:41:03 +02:00
Ghostkeeper
3b36223681
Merge branch '3.5' 2018-09-14 12:40:29 +02:00
Ghostkeeper
e9cdd47a03
Fix types of getGlobalContainerStack call results
We know in these places that there must be a global stack at this point. So to hide the type error we'll cast it here.
Of course, the danger in this is that someone might call this function that doesn't know about this requirement and calls it when there is potentially no global stack yet. Hopefully they'll discover this crash when that happens then.
2018-09-14 12:38:16 +02:00
Jaime van Kessel
757c8754b1 Merge branch '3.5' of github.com:Ultimaker/Cura 2018-09-13 16:23:55 +02:00
Lipu Fei
b27e5a1f77 Fix getActiveExtruderStacks()
CURA-5719

The dict values can be a random list. We need to fetch the first N
extruders starting from position 0.
2018-09-12 14:00:36 +02:00
Jaime van Kessel
c84a2213a7 Merge branch '3.5' of github.com:Ultimaker/Cura 2018-09-11 11:01:55 +02:00
Diego Prado Gesto
351fe5c5bc Fix style. 2018-09-10 17:25:06 +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
Jaime van Kessel
5c6c299b27 Cleanup extruder manager
Few more unused functions removed & simplified.
It also fixes a few more typing issues that I encountered.
2018-09-07 17:06:18 +02:00
Jaime van Kessel
e6d0a9cc6a Add missing typing 2018-09-07 16:33:44 +02:00
Jaime van Kessel
a8fc6aabcc Switch incorrect usage of getMachineExtruders to getActiveExtruderStacks 2018-09-07 16:27:56 +02:00
Jaime van Kessel
638f9fb941 Remove unused functions 2018-09-07 16:02:54 +02:00
Jaime van Kessel
20ec8828ed Fix incorrect type hinting
The type hinting indicated that the property was a dict, but it could also be None.
In cases where it was None, it would cause an exception, which was also fixed (since
unpacking None will break)
2018-09-07 15:32:07 +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
fieldOfView
7b00d6879a Factor out USBPrinterManager singleton 2018-08-22 15:44:11 +02:00
alekseisasin
ff38ee2bed
Merge pull request #4245 from Ultimaker/CURA-5649_hide_gcodegz_in_save_dialog
CURA-5649 Do not show gcode.gz as an option in save file dialog
2018-08-22 14:12:08 +02:00
Lipu Fei
edc4e2824d
Merge pull request #4237 from Ultimaker/fix_unit_tests
Fix unit tests
2018-08-20 10:32:38 +02:00
Lipu Fei
013032279d Better handling of no quality group in CuraStackBuilder 2018-08-17 10:00:28 +02:00
Ghostkeeper
31e283110f
Check first if preferred quality exists
Fixes #3784.
2018-08-17 09:31:33 +02:00
Lipu Fei
f42dc24d95 Do not show gcode.gz as an option in save file dialog
CURA-5649
2018-08-16 15:16:32 +02:00