541 Commits

Author SHA1 Message Date
Kostas Karmas
543daa52c9 Check for updatable machines after the machine_definition_id changes
So that we can account for the issue with the Dagoma printers (CURA-7517), which when they were
updated, the dagoma_discoeasy200 (dual extruder) was renamed to dagoma_discoeasy200_bicolor
and the dagoma_discoeasy200 became single extrusion. In this case, the project files created
before 4.6 should look for the dual extrusion dagomas (dagoma_discoeasy200_bicolor).

CURA-7644
2020-10-02 16:57:21 +02:00
Kostas Karmas
1dc8840ba8 Remove attribute initialization
Since the self._conflicts_found["machine"] is already initialized to false when clearState is
called at the start of preRead.

CURA-7644
2020-10-02 15:52:19 +02:00
Kostas Karmas
524cd48b80 Remove duplicate global_stack variable
CURA-7644
2020-10-02 15:21:18 +02:00
Kostas Karmas
c4ca29ffa8 Rename the variables containing serialized data for readability
CURA-7644
2020-09-18 17:08:12 +02:00
Kostas Karmas
a228280ea6 Remove duplicate code fragment
CURA-7644
2020-09-11 17:32:09 +02:00
Kostas Karmas
b820a57f6a Fix mypy complaints
CURA-7644
2020-09-11 17:14:41 +02:00
Kostas Karmas
eb9c69ee4d Separate the reading of instance containers from the archive into its own function
CURA-7644
2020-09-11 16:44:52 +02:00
Kostas Karmas
9df190316e Merge branch 'master' into CURA-7644_Refactor_ThreeMFWorkspaceReader 2020-09-11 15:12:17 +02:00
Kostas Karmas
4e87f37791 Fix visual issues with long labels in the open project dialog
The following issues are fixed:
 * Printer/Quality/Material names will be wrapped if they are too long
 * The width of the window is determined based on the content of the dialog.
	With that there will not longer be overlap between the dialog content and the buttons.
2020-08-21 14:50:00 +02:00
Ghostkeeper
9ea418c0a1
Revert "Revert "Merge branch '4.7' of github.com:Ultimaker/Cura into 4.7""
This reverts commit 28f4d8513db7efce17bfd8b80fa7c8b237fd1c18.
The original revert was to revert an accidental merge from master to 4.7. This now reverts the revert on Master, so that we still have those changes on Master.
2020-08-20 16:35:52 +02:00
Ghostkeeper
28f4d8513d
Revert "Merge branch '4.7' of github.com:Ultimaker/Cura into 4.7"
This reverts commit 7f47f12bf0a9cf305542b6c21600ce9b804c1dfd, reversing
changes made to dd42c87da762d2030ee2220bc6f0a3e44cf85c28.
2020-08-20 16:01:46 +02:00
Kostas Karmas
f6acc57eab Move the reading of the materials outside the preRead
CURA-7644
2020-08-14 17:07:02 +02:00
Kostas Karmas
fd529c48c8 Fix mypy complains about Optional ConfigParser
CURA-7644
2020-08-14 13:59:45 +02:00
Kostas Karmas
a5a5d944e0 Update comments in function descriptions
CURA-7644
2020-08-14 13:43:18 +02:00
Kostas Karmas
bc7ee7ec69 Merge branch '4.7' into CURA-7644_Refactor_ThreeMFWorkspaceReader 2020-08-14 13:34:32 +02:00
Kostas Karmas
e8ef7699df Merge branch 'master' into CURA-7644_Refactor_ThreeMFWorkspaceReader 2020-08-14 13:19:54 +02:00
Jaime van Kessel
7f47f12bf0
Merge branch '4.7' of github.com:Ultimaker/Cura into 4.7 2020-08-14 10:01:26 +02:00
Kostas Karmas
01d5e846aa Document possible theoretical issue when loading a project file
The issue will happen only if the machine_extruder_count is a formula.
In this case, the project loading will not work properly if "Create new" printer is selected,
as the settings of all extruders but the first one will not be applied.
Workaround in this case will be to load the project again and select to update the existing
printer, in which case all settings will load properly.

CURA-7646
2020-08-11 12:37:34 +02:00
Kostas Karmas
0feeccff85 Appease mypy complaints for AttributeErrors
CURA-7646
2020-08-10 15:30:55 +02:00
Kostas Karmas
f8a15ea29e Display only the relevant materials when opening a project
Ignore the materials of the extruders that are not visible when opening a project file with a CFFF.

CURA-7646
2020-08-10 15:00:08 +02:00
Kostas Karmas
61cc8c9a95 Remove reference to JIRA ticket in comments
CURA-7646
2020-08-10 14:58:59 +02:00
Kostas Karmas
b9d5f0dc15 Take the machine_extruder_count into consideration when opening project
CURA-7646
2020-08-10 14:56:37 +02:00
Ghostkeeper
1f09ea58cc
Merge branch '4.7' 2020-08-10 11:26:25 +02:00
Ghostkeeper
fc6ea28352
Don't crash if CuraStackBuilder failed to create a stack
If it failed to create a global stack, the extruder_stack_dict variable would not be defined, and Cura crashes. It may fail to create a stack because of an indexerror in a malformed project file.

Fixes Sentry issue CURA-137.
2020-08-10 11:25:55 +02:00
Kostas Karmas
870aa80da5 Fix mypy complaints for missing types in ThreeMFWorkspaceReader
CURA-7644
2020-08-07 17:28:28 +02:00
Kostas Karmas
7f941f7f6b Fix typing in ThreeMFWorkspaceReader
CURA-7644
2020-08-07 17:05:54 +02:00
Kostas Karmas
41a1ef12d7 Read the definition files of the project file in a separate function
CURA-7644
2020-08-07 16:41:06 +02:00
Kostas Karmas
bd54ef8d5a Update the SDK version to 7.3.0 for 4.7
CURA-7641
2020-08-07 11:12:27 +02:00
Jaime van Kessel
3cdf5a82a4
Use correct property to search container stack
CURA-7609
2020-08-06 15:26:32 +02:00
Jaime van Kessel
ebdab94b98
Merge branch 'CURA-7609_Pick_any_printer_when_opening_a_project_file_single_dropdown' of github.com:Ultimaker/Cura 2020-08-06 15:26:16 +02:00
Jaime van Kessel
c8771124ad
Change function name to better reflect what it does
CURA-7609
2020-08-05 14:56:39 +02:00
Kostas Karmas
4e20c7dddc Rework the open project dialog to contain only 1 dropdown
With the caveat that the qtQuickControls had to be updated to 2.3, due to a qt bug in 1.x that did
not update the dropdown popup list according to the ListModel.
This leads to a different look in the dropdowns and in the buttons of the open project dialog,
compaired to the rest of the application.

CURA-7609
2020-08-04 16:33:11 +02:00
Kostas Karmas
e5d3271698 Fix mypy complaining that Application has no createQmlComponent
Using CuraApplication instead fixes the problem

CURA-7609
2020-08-03 17:43:14 +02:00
Kostas Karmas
9ad046654a Add typing in WorkspaceDialog.py
In response to feedback comment https://github.com/Ultimaker/Cura/pull/8142#discussion_r464309170

CURA-7609
2020-08-03 17:31:21 +02:00
Kostas Karmas
6c59616e39 Process feedback comments
Comments https://github.com/Ultimaker/Cura/pull/8142#discussion_r464309980 and https://github.com/Ultimaker/Cura/pull/8142#discussion_r464310281

CURA-7609
2020-08-03 17:30:21 +02:00
Kostas Karmas
60cfb6a8be Change name of updatable_machines to updatable_machine_names
Since it is a list of name strings and not a list of machines.

Response to feedback comment https://github.com/Ultimaker/Cura/pull/8142#discussion_r464307564

CURA-7609
2020-08-03 17:28:44 +02:00
Kostas Karmas
949837f041 Fix crashing when opening project files without materials 2020-08-03 16:20:44 +02:00
Kostas Karmas
a6d779e722 Sort materials based on extruder position in the open project dialog
From eCCB
2020-08-03 16:20:29 +02:00
Kostas Karmas
ce72bb1a0b Fix creating new machine being reverted to overridde in some cases
CURA-7609
2020-08-03 15:47:01 +02:00
Kostas Karmas
9793c2cfde Fix crashing when opening project files without materials 2020-08-03 14:54:44 +02:00
Kostas Karmas
9f6b4f0255 Sort materials based on extruder position in the open project dialog
From eCCB
2020-08-03 14:34:45 +02:00
Kostas Karmas
37febc9f60 Remove comment
CURA-7609
2020-08-03 09:24:40 +02:00
Kostas Karmas
db857c8c20 Add extra spacing between categories in the open project dialog
CURA-7609
2020-08-03 09:21:16 +02:00
Kostas Karmas
ff4e4ccf55 Change text in the combobox
Since it was anyway truncated

CURA-7609
2020-08-03 09:07:20 +02:00
Kostas Karmas
52ea3e8fcc Change variable names (available -> updatable)
CURA-7609
2020-07-29 17:19:24 +02:00
Kostas Karmas
98cc87d1cf Allow picking any printer of the same type when opening project file
A ComboBox was added under the "Update existing" combobox which will display all the available
printers that are of the same type with the printer in the project file. With this feature, the
user will be able to select any same-type preexisting printer in Cura to be updated, instead of
always create a new one when the project file's printer is not in Cura.

CURA-7609
2020-07-29 13:02:34 +02:00
Kostas Karmas
daa66a89f3 Ignore machine network metadata when reading a project file
CURA-7608
2020-07-28 11:18:04 +02:00
Jaime van Kessel
38256f7a98
Add cast so that mypy doesn't choke 2020-07-08 11:05:46 +02:00
Jaime van Kessel
91690524c0
Ensure that the 3mf reader doesn't make groups of one 2020-07-08 10:39:33 +02:00
Kostas Karmas
4f97089e47 Fix losing global quality changes when reading a 3MF with a CFFF
By using "pass" when the IndexError occured while reading the quality changes, empty quality
changes containers were added to the registry. These empty quality changes were then used as
"global" quality_changes, since the container registry was simply picking the first quality
changes instance container that had an empty extruder stack. Therefore, the correct global
quality changes (that actually had the global settings that were changed, like the support)
was just ignored in the whole process.

CURA-7549
2020-07-07 10:43:02 +02:00