982 Commits

Author SHA1 Message Date
c.lamboo
be40920042 Fix cura crashing
`activeQualityDisplayNameMap` no longer returned a dict and could thus not be a pyqt property

Cura-9773
2022-11-28 13:14:47 +01:00
c.lamboo
8e8437eab0 Split of getStringParts function
Spit into `getMainStringParts` and `getTailStringParts` so we can easily differentiate between the two in the front-end.

Cura-9773
2022-11-28 13:10:52 +01:00
Joey de l'Arago
8dcccd941b Add dataclass for ActiveQuality. Move some logic out of MachineManager into ActiveQuality.
CURA-9793
2022-11-28 12:40:35 +01:00
Casper Lamboo
f297909a82
Fix type signature of function
Co-authored-by: Joey de l'Arago <joeydelarago@gmail.com>
2022-11-28 11:23:53 +01:00
Casper Lamboo
a645fa7d96
Use bracket to initialise list
Co-authored-by: Joey de l'Arago <joeydelarago@gmail.com>
2022-11-28 11:22:53 +01:00
c.lamboo
4fa024cd31 Group intent and quality
Bit of an ugly hack. At later point in the code it is assumed the first element of the list is the main part and the remaining elements form the suffix. Intent and the profile form both the main part so these need to be grouped together.

Cura-9773
2022-11-25 16:48:06 +01:00
c.lamboo
52ee149edc Unify activeQualityDisplayNameMap string creation
Generation quality display names in `CustomPrintSetup.qml` and `PrintSetupSelectorHeader.qml` were so similar that I decided to combine the logic.

Cura-9773
2022-11-25 16:09:55 +01:00
c.lamboo
e8f6786e97 Revert "Add quality type to ufp files"
This reverts commit 7e84082aff26195d82b8d3c9239dee863949c099.
2022-11-24 22:56:35 +01:00
c.lamboo
7e84082aff Add quality type to ufp files
Cura-9773
2022-11-24 13:55:31 +01:00
Joey de l'Arago
8e883cf546 This fixes a crash when loading a 3mf with a printer that has no extruders while the current global stack also has no extruders.
This was caused by trying to compare "extruders_enabled_count" which was None with an integer.

CURA-9714
2022-10-06 11:44:30 +02:00
c.lamboo
d97dddcfe2 Revert "More agressivly check online printers"
This reverts commit 92b371cd508ebf5102aa5ae979865d2bac591b7e.
2022-09-13 10:41:46 +02:00
c.lamboo
92b371cd50 More agressivly check online printers
CURA-9278
2022-09-12 17:34:44 +02:00
c.lamboo
8d9e9a9dbf Use modern python typing
CURA-9278
2022-09-12 17:04:40 +02:00
c.lamboo
2d3ad84167 Fix extruders enabled button not updating
The `numberExtrudersEnabled` property was never updated, as such the checks if the property changed based on the new value being different from this value didn't work.

CURA-8463
2022-09-05 14:31:21 +02:00
Remco Burema
4ea437ba28 Make send to DF in monitor for abstract printer work (again-ish).
Already moslty implemented, but a new approach of the base feature (abstract cloud printers) made a more? elegant and functioning implementation possible.

(re)implements CURA-9422
2022-08-31 14:13:47 +02:00
Jaime van Kessel
4c55befad7
Merge branch 'main' of github.com:Ultimaker/Cura into CURA-8463_cloud_configuration 2022-08-31 10:39:05 +02:00
Jaime van Kessel
46532828a4
Add logging for when setting the active machine failed
CURA-8463
2022-08-26 13:46:01 +02:00
Remco Burema
95f234679c Placeholder; the selected printer to monitor is abstract, but cloud-capable.
forms the base of CURA-9422
2022-08-26 13:10:09 +02:00
c.lamboo
f000b75661 Move getMachinesWithDefinition to MachinesManager
CURA-9514, CURA-9277
2022-08-26 11:16:10 +02:00
j.delarago
a87695cd8d Added new intent selection buttons and resolution drop down to replace the matrix.
We are now selecting intents first and then quality, however the container hierarchy quality -> intents. This is the reason for the new functions inside machine manager.

CURA-8849
2022-06-14 11:41:38 +02:00
Jaime van Kessel
e6551821aa Use intent category if no translation is available
Previously we would only accept intents that had a translation. If we
could not find one, we would use "unknown" as the intent category. However,
we didn't really do this consistently. In some places it would show unkown
and in others we'd show the intent type.

This should make the behavior the same across the board. It will try to get a
translation for the intent category and show that. If it's unable to find that
it will use the category instead. Note that it will use the python title function
to ensure it has nice capitalisation

CURA-9297
2022-06-01 11:07:01 +02:00
Remco Burema
abe7c1bf7f
Search/replace Qt5->Qt6.
part of upgrading Qt to v6.2: CURA-8591
2021-12-28 14:46:02 +01:00
Jaime van Kessel
998ba3631c Add missing format to error log 2021-12-15 12:03:55 +01:00
Ghostkeeper
ca942a15e8
Don't use infinite lifetimes lightly
This is very annoying if switching profiles. This is not a critical message. The message should disappear after the default amount of time.

Discovered while working on CURA-8584.
2021-11-09 14:45:40 +01:00
Jaime van Kessel
c7c052e51c Fix crash when profile referenced unavailable extruder
CURA-8584
2021-11-05 15:50:24 +01:00
Ghostkeeper
58f4d44694
Don't crash when switching to printer with fewer extruders
This seems to have happened with an UM2+C.

Fixes Sentry issue CURA-2R5.
2021-09-21 13:40:40 +02:00
luz paz
d68f375e38 Fix various typos
Found via `codespell -q 3 -S *.po,*.pot -L childs,initialy,lod,ned,te,slicable,sur,tutoriels,wont`
2021-09-07 11:33:54 -04:00
Jelle Spijker
2263969d5f
Updated message with message types
Contributes to CURA-8418
2021-07-28 08:45:42 +02:00
Kostas Karmas
4b35bd1724 Correct the print sequence when discarding the current changes
CURA-7827
2020-11-09 18:10:50 +01:00
Kostas Karmas
fab2c31b4f Cover the last remaining case when setting the print sequence
If for some reason the print sequence is set to one-at-a-time be default in the printer definition
and the number of extruders of the printer is set to >=2, then the print_sequence won't show up in
neither the quality changes nor the user changes, yet it will still have "one-at-a-time" as a
value. In a such case, it will still need to be set to "all-at-once" in the user changes.

This is a theoretical case, as it is very unlikely for a printer to have "one-at-a-time" set by
default in its definition (.def.json) file and still be able to support more than one extruders.
But it is a world full of possibilities out there, so you never know...

CURA-7827
2020-11-09 16:55:43 +01:00
Kostas Karmas
07453e101e Add detailed documentation for _correctPrintSequence function
CURA-7827
2020-11-09 16:32:05 +01:00
Kostas Karmas
2ccdd11098 Properly set the print sequence in the correct container
Previously, the print sequence would be always set to all-at-once in the user container whenever
the second extruder would be enabled. This was causing an interface issue, where the circular
reset-setting arrow would appear next to the setting, even if the quality changes already had the
correct value ("all-at-once").

This is now fixed by checking the following:
- If print_sequence == "one_at_a_time" in the quality (so it is already saved in a quality profile)
then set the print_sequence to "all_at_once" in the user changes so that it will be displayed as
an unsaved change
- If print_sequence == "one_at_a_time" in the user changes container only, meaning that it is not
saved in any quality profiles, then just reset the print_sequence in the user changes, so that it
will have the correct value ("all-at-once") without the reset-setting arrow appearing next to it.

CURA-7827
2020-11-09 16:20:13 +01:00
Kostas Karmas
a1c7ebe1c3 Fix mypy complaints
CURA-7827
2020-11-05 19:04:29 +01:00
Kostas Karmas
845c994cbc Replace f string since it's not available in Python3.5
That should fix the failing test which produces a SyntaxError.

CURA-7827
2020-11-05 17:38:34 +01:00
Kostas Karmas
1a759f81df Change print sequence when the number of enabled extruders changes
Fixes https://github.com/Ultimaker/Cura/issues/8682 while still maintaining the correct behavior for CURA-6914.

CURA-7827
2020-11-05 16:58:47 +01:00
Jaime van Kessel
50ae33c42d
Force an re-evaluation of a setting when extruder has been disabled
CURA-7770
2020-10-16 10:50:05 +02:00
Kostas Karmas
f25bfd717e Recalculate the number of user settings after setting the quality group
So that the dialog ensures actually knows that there are no changed settings and will not show up.

CURA-7728
2020-10-06 09:55:11 +02:00
Jaime van Kessel
dd359da1cf
Prevent crash when material is unknown
Fixes CURA-GV
2020-09-16 16:37:09 +02:00
Jelle Spijker
0725bdcd64
Merge pull request #8335
Speed up disable extruder
2020-09-09 09:42:36 +02:00
Ghostkeeper
6e2738a254
Don't update extruders that Cura doesn't have
This is a bit of defensive coding. If the position is out of bounds for Cura it should now ignore those extruders.
This could be due to broken firmware, or maybe someone MITM-ing the connection and changing it, or perhaps because the printer was changed while the sync was ongoing? Whatever the cause, it now puts a warning in the log about it and doesn't crash any more.

Fixes Sentry issue CURA-156.
2020-09-08 12:53:30 +02:00
Jaime van Kessel
175244fdc8
No longer spam the GUI with hasUserSettingsUpdates
The QML profiler showed me that it was causing a *lot* of issues
when switching between extruders. More than 10% of the time in QML
was spent on just updating ine property in the workspace summary dialog.
There were other properties that were also being updated without there being a point.

Contributes to #8250
2020-09-04 17:23:52 +02:00
Jaime van Kessel
6dbdee8d98
Don't switch away from disabled extruder
In some situations this could cause a slowdown, since halfway through
calculating the values the extruder switch would happen. If this is
split up a bit, it's at least less noticeable

Contributes to #8250
2020-09-04 16:43:53 +02:00
Jaime van Kessel
c383fe9656
Don't force an update when disabling an extruder
All the settings that are changed get a notification from the settingRelation.
There should be no need to re-fire all of those settings again!

Contributes to #8250
2020-09-04 16:39:06 +02:00
Jaime van Kessel
8ecdce3b26
Remove postponeEmit that didn't do anything
The signals it was postponing weren't ever being triggered
2020-09-04 16:38:15 +02:00
Jaime van Kessel
1097dbdfa5
Fix copypaste mistake 2020-08-24 10:11:49 +02:00
Jaime van Kessel
13600504d4
Fix mypy failure 2020-08-24 09:33:56 +02:00
Jaime van Kessel
87fb495e07
Add some property tests for MachineManager 2020-08-21 16:36:04 +02:00
Jaime van Kessel
4a47606176
Fix mypy issue 2020-08-21 15:52:13 +02:00
Jaime van Kessel
ce930220e9
Add tests for SetActiveMachine 2020-08-21 15:14:44 +02:00
Jaime van Kessel
907caa53f0
Ensure that changing material type results in profile re-evaluation
CURA-7657
2020-08-18 13:54:21 +02:00