792 Commits

Author SHA1 Message Date
Jaime van Kessel
27277d4e54
Add missing typing 2020-06-24 15:28:41 +02:00
Jaime van Kessel
ac0c0d0698
Let the error checker calculate the error values a bit more "on demand"
Previously it would just re-try all settings, but this really isn't needed (since
we have a setting relationship object that can tell us what settings depend on what).
This won't speed things up in a worst case scenario (since that will still be "caluclate
all the settings") but it will speed it up in most cases.

Most setting changes now only trigger a calculation that takes <0.2 sec isntead of the 1.1 sec.
Yes, those numbers seem big, but the error checking is already built in such a way that it spreads this
out over multiple frames (so it's not actually freezing that time, but it is doing shit it shouldn't do!)

CURA-7106
2020-06-23 14:54:56 +02:00
Kostas Karmas
5c898b8c57 Allow the machine manager to set an empty active machine
Gracefully handle the case where the machine manager is requested to
delete the last machine in Cura. In this case, instead of deleting
everything of this machine and still keep it as an active machine,
the machine manager will set the active machine to None.

The QML files which depend on the active machine were changed to
properly handle themselves when there is no active machine.

CURA-7454
2020-06-09 15:33:22 +02:00
Jaime van Kessel
83fd35424b
Store data for metadata first
This should help with providing data to sentry to find out what the hell is going wrong
2020-06-08 10:31:40 +02:00
Ghostkeeper
e98c26a33c
Don't use deprecated extruders property
Done during Turbo Testing and Tooling.
2020-05-29 18:07:08 +02:00
Ghostkeeper
b68c3b7301
Remove usage of deprecated extruders property
Initially PyCharm didn't find this because it's not typed.

Done during Turbo Testing and Tooling.
2020-05-29 18:06:02 +02:00
Nino van Hooff
89f0970a88 Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
Nino van Hooff
58ffc9dcae Merge remote-tracking branch 'origin/master' into doxygen_to_restructuredtext_comments
# Conflicts:
#	cura/API/__init__.py
#	cura/Settings/CuraContainerRegistry.py
#	cura/Settings/ExtruderManager.py
#	plugins/PostProcessingPlugin/scripts/PauseAtHeight.py
#	plugins/UM3NetworkPrinting/src/Cloud/CloudApiClient.py
#	plugins/UM3NetworkPrinting/src/Cloud/ToolPathUploader.py
#	plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDeviceManager.py
2020-05-28 17:31:24 +02:00
Jaime van Kessel
dff4771fae
Merge branch 'master' of https://github.com/loociano/Cura 2020-05-25 11:29:37 +02:00
Kostas Karmas
f677be14c2 Fix spacing
CURA-7436
2020-05-20 15:10:04 +02:00
Kostas Karmas
4e930b4d52 Remove unused "has_cloud_connection" variable
CURA-7436
2020-05-20 15:08:05 +02:00
Nino van Hooff
252b993169 Refactor removal warning message to CloudOutputDeviceManager
CURA-7436
2020-05-18 16:22:55 +02:00
Nino van Hooff
c61f5a162e Update remote and local printer labels in Machines page
CURA-7436
2020-05-18 14:49:05 +02:00
Nino van Hooff
3d19e75c82 Notify user of proper way to remove cloud printer
CURA-7436
2020-05-18 14:48:19 +02:00
Luc Rubio
6fe66bf525 Add support for more than one network plugin when adding a network printer by IP address. 2020-05-18 00:16:09 +01:00
Ghostkeeper
bbf53c441f
Don't use extruders() but extruderList
The extruders() slot has been deprecated. We need to replace it with extruderList. I'm changing them one by one and testing each time whether everything still seems to function correctly, but it's fairly safe anyway.

Done during Turbo Testing and Tooling to reduce the number of warnings in our log.
2020-05-15 15:06:58 +02:00
Ghostkeeper
833a7a3804
Don't use deprecated extruders()
It has been replaced by extruderList.

Done during Turbo Testing and Tooling to reduce the number of warnings in our log.
2020-05-15 15:04:47 +02:00
Jelle Spijker
120541a8db
Updated comments in Models
Converted doxygen style comments to reStructuredText style in the files
 found in Cura/cura/Model directory recursively  using the script
dox_2_rst.py (provided in the Uranium repo). Comments were manually
 checked and changed if needed.

 Note: dox_2rst.py struggles with decorated functions.
2020-05-08 18:59:38 +02:00
Kostas Karmas
6959c9ac42 Rename _discovered_ultimaker_cloud_printers_list to _discovered_cloud_printers_list
CURA-7022
2020-04-29 15:01:50 +02:00
Kostas Karmas
b459895589 Add comments
CURA-7022
2020-04-29 14:19:28 +02:00
Kostas Karmas
2fb7e67043 Cleanup _update()
CURA-7022
2020-04-29 13:55:03 +02:00
Kostas Karmas
58b61f2331 Remove unnecessary newCloudPrintersDetected variable
Variable newCloudPrintersDetected is no longer needed, as it is communicated through the
signal itself.

CURA-7022
2020-04-29 13:47:11 +02:00
Kostas Karmas
eda868f938 Make the discovered cloud printers model generic
Removed the dependency of the DiscoveredCloudPrintersModel on CloudOutputDevice,
which is Ultimaker specific. This can allow even external plugins to add to this
model in the future.

CURA-7022
2020-04-29 13:31:45 +02:00
Kostas Karmas
c7cf0fab2f Merge branch 'master' into CURA-7022_Add_cloud_printer_within_add_a_connected_printer 2020-04-29 12:04:04 +02:00
Kostas Karmas
d6ddfb3990 Add typing
CURA-7022
2020-04-28 14:50:47 +02:00
Kostas Karmas
ea404af973 Transfer cloudPrintersDetectedChanged in DiscoveredUltimakerCloudPrintersModel
CURA-7022
2020-04-28 14:19:28 +02:00
Kostas Karmas
0ad9464131 Remove IP Address from DiscoveredCloudPrintersModel
CURA-7022
2020-04-28 13:19:19 +02:00
Kostas Karmas
6583f5f5ac Reset the model when pressing the Add cloud printer button
CURA-7022
2020-04-28 12:08:48 +02:00
Kostas Karmas
cd8a0fc0bc Introduce DiscoveredUltimakerCloudPrintersModel
Have a separate model to hold the discovered ultimaker cloud printers.
This model will be used to communicate across the application that new
cloud printers have been found which they weren't seen before.

CURA-7022
2020-04-24 19:09:50 +02:00
Kostas Karmas
ad6f837f44 Force reloading the VariantNode if it exists
When the MachineNode is updated through _loadAll, it was not updating
its VariantNodes when they already existed. This caused an issue to
UM2+Olsson block printers, where changing the G-Code flavor to Marlin
was not updating the VariantNodes to search for materials (since the
variants already existed).

This commit fixes that by forcing an update to the existing Variant
nodes.

CURA-7354
2020-04-21 14:41:17 +02:00
Ghostkeeper
4050d3ccde
Prevent crash when a setting is not in any setting category
I don't know what exactly caused this since it's impossible to trace. But the crash happened with a setting called 'dual_gcode' which currently doesn't exist in Cura. So I think it must be some plug-in that adds it. In any case, it's good to be defensive about this sort of thing. Good type checking would've caught this for us.

Fixes Sentry issue CURA-JB.
2020-04-14 21:06:10 +02:00
Jaime van Kessel
2e9dca71ce
Remove a number of unused imports 2020-04-10 13:58:10 +02:00
Jaime van Kessel
fe27da5e8a
Remove a number of unused variables 2020-04-10 13:46:19 +02:00
Jaime van Kessel
e4930d3c3b
Add missing typing 2020-02-28 13:53:43 +01:00
Jaime van Kessel
769fc8fd37
Fix crashing when material could not be found
See CURA-3M in sentry. It most commonly happens with the anycubic,
since it had some weird stuff with it suddenly supporting materials.

This change will make it so that no crash happens. Old profiles will still have
an empty material. This isn't really an issue, since the interface will mark this
as an error (prompting users to switch).
2020-02-17 10:57:24 +01:00
Kostas Karmas
d5cfca4df0 Fix loading machine specific materials
The container registry was incorrectly being searched with a
variant_name == None, which always returned an empty printer-specific
materials list. As a result, the generic material settings were always
being loaded if there was no variant specifically indicated inside
the fdm_material file. The printer specific values were consistently
being ignored.

This commit fixes that by removing the search with a variant_name==None
which correctly returns the printer-specific materials list while
loading the materials from the variant nodes.

CURA-7087
2020-01-13 13:44:51 +01:00
Kostas Karmas
601a765f73 Fix typo in comment 2020-01-13 13:44:36 +01:00
Jaime van Kessel
eaf8b3491e
Fix typing issue 2020-01-10 17:49:47 +01:00
Jaime van Kessel
e74f049142
Fix bunch of issues found by pylint 2020-01-10 16:37:46 +01:00
Jaime van Kessel
81b33b8649
Add some missing typing 2020-01-10 14:58:53 +01:00
Lipu Fei
045f4c51fa Fix BaseMaterialsModel's QTimer lifecycle 2020-01-07 11:37:37 +01:00
Jaime van Kessel
7954f6633f
Let IntentModel update on a timer
This prevents some double updates
2020-01-03 14:13:13 +01:00
Jaime van Kessel
8b393317ff
Add "all" as a setting visibility preset
CURA-7082
2020-01-02 10:51:40 +01:00
Jaime van Kessel
0862fd493e
Fix some tests not cleaning up correctly after themselves
The PrintInformation test wasn't cleaning up after itself correclty. This
left some stuff behind that the other tests were using. Since this is bad (as at that point
tests can influence other tests), i've fixed that
2019-12-24 16:20:09 +01:00
Ghostkeeper
8a9b791298
Merge branch '4.4'
Conflicts:
	cura/Machines/MaterialNode.py -> Due to some automated formatting tool. Please disable those tools, people.
2019-12-23 16:26:25 +01:00
Kostas Karmas
cf6540f91d Fix qualities lookup for custom materials
Search the qualities of the custom material based on the base_file
and not based on the id.

CURA-7070
2019-12-18 16:44:19 +01:00
Lipu Fei
6c9b8f992f Fix quality search with material base_file
CURA-7070
2019-12-18 15:39:17 +01:00
Lipu Fei
4b313c2dac Fix formatting
CURA-7070
2019-12-18 15:38:23 +01:00
Ghostkeeper
a9849be1b2
Code style: Space around binary operators 2019-12-16 13:15:40 +01:00
Remco Burema
382d177a3b
Merge branch 'master' into CURA-7012_manage_materials_third_party_printers 2019-12-12 14:06:39 +01:00