Commit graph

2275 commits

Author SHA1 Message Date
Jelle Spijker
12ee57e4ad
Merge branch 'master' into CURA-8640_PyQt6
# Conflicts:
#	cura/UI/CuraSplashScreen.py
2022-03-28 15:02:18 +02:00
Jaime van Kessel
1532779d1b Remove Extruders property from global stack
CURA-7810
2022-03-24 14:26:03 +01:00
Ghostkeeper
c7d7dd11d1
Merge branch 'master' into PyQt6_upgrade
Conflicts:
	cura/PlatformPhysics.py -> Removed shapely on master, while QTimer import got updated to Qt6.
	plugins/Toolbox -> Entire folder is deleted in master, but it was updated to Qt6 here. This can all be removed.
2022-02-21 11:52:28 +01:00
Ghostkeeper
3534894eeb
Don't mark interface extruder as used when there are none
If there are 0 interface layers, the extruder doesn't necessarily gets used.

Contributes to issue CURA-8915.
2022-02-03 15:59:21 +01:00
Ghostkeeper
403d92a760
Fix getting used and starting extruders with new adhesion extruder settings
Getting more involved than I thought. But it's not complex yet.

Contributes to issue CURA-8868.
2022-01-12 14:29:01 +01:00
Ghostkeeper
ab0c03cf65
Catch KeyError['empty_material'] when evaluating whether there's any profiles
This is currently only used in the pre-read of workspaces. In some cases, the project file may have a material that is not compatible with its own stack using the current rules in Cura, either because the rules changed or because the project file is wrongly crafted/edited. This causes Cura to say there are no quality profiles if the material profile is not compatible with the printer, preventing a crash due to the KeyError.
2022-01-05 10:26:28 +01:00
Remco Burema
6586bcc762
Qt5->Qt6: Fix cause of stack-overflow errors for newer Python/Qt.
part of CURA-8591
2021-12-29 09:23:11 +01:00
Remco Burema
b62e708b87
Qt5->Qt6: (Until) attempted fix Python 3.10 'stack overflow' issue.
part of CURA-8591
2021-12-28 18:12:36 +01:00
Remco Burema
32b52c6166
Qt5->Qt6: Rectify constant locations: UserRole, CppOwnership
part of CURA-8591
2021-12-28 14:54:56 +01: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
fieldOfView
19dbd1f168 Merge branch 'master' into feature_extruder_warning_icon 2021-11-16 14:56:43 +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
Jaime van Kessel
285a4584e7 Improve speed of the inherit button
A few unneeded conversions were done. Also moved one check to python from JS
2021-10-08 18:12:35 +02:00
Jaime van Kessel
e88ac49fd6 Add global & extruder stack to ignore list for name filters
This prevents the weird spam about "global_stack" not being a plugin ID
2021-09-27 13:41:53 +02: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
Remco Burema
b2eae08cc7
Merge pull request #10327 from Ultimaker/CURA-6096_profile_database
Store metadata in database
2021-09-09 17:29:40 +02:00
Ghostkeeper
034f62ea2c
Match table name with container type
The table name is used as the container type in the resulting metadata, so we need to use the container type string as table name correctly, or none of the profiles can be found.

Contributes to issue CURA-6096.
2021-09-08 16:40:22 +02:00
Ghostkeeper
057ba8cdeb
Fix setting container type of subclasses
This mistake caused all of the container types to end up as either None or the actual instance itself, which was causing crashes.

Contributes to issue CURA-6096.
2021-09-08 15:46:25 +02:00
Ghostkeeper
adac0af1ec
Revert "Use SQLQueryFactory for container DB"
This reverts commit 571a051041.
2021-09-08 15:10:32 +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
571a051041
Use SQLQueryFactory for container DB
Needed to add a Filter possibility to facilitate that
Created a Simple UserString class which can be used as:

```py
        sql_filter = SQLFilter(f"SELECT {{}} FROM table_name WHERE id = ?")
        cursor.execute(sql_filter)  # Will execute: SELECT * FROM table_name WHERE id = ?
        cursor.execute(sql_filter["id", "name"])  # Will execute: SELECT id, name FROM table_name WHERE id = ?

```

Contributes to CURA-6096
2021-09-02 16:55:24 +02:00
jelle Spijker
4067d9d607
Fixed typing
Contributes to CURA-6096
2021-09-02 10:17:40 +02:00
jelle Spijker
f80e1ec279
Updated documentation
Contributes to CURA-6096
2021-09-01 18:58:03 +02:00
jelle Spijker
7aa08d4acd
Use a class to build to sql queries
This greatly reduced the amount of duplicate code in the DataBaseHandlers
Not sure how secure this is SQL injections. Need to check that and maybe
put in some guards. Using double underscores for now and only provide a
getter. But then again why bother with an SQL injection as
you can just as easily modify the Python code, and we still have the old
Containers to fallback to if the Database gets corrupted.

Contributes to CURA-6096
2021-09-01 16:58:48 +02:00
Jaime van Kessel
3191baf5a0 Add delete to handlers
CURA-6096
2021-08-27 14:36:04 +02:00
Jaime van Kessel
55d6ff0e61 Clean up formating of the insert queries
CURA-6096
2021-08-25 13:58:11 +02:00
Jaime van Kessel
132b863e13 Add update queries for variant, intent & qualit DB handlers
CURA-6096
2021-08-25 13:48:25 +02:00
fieldOfView
96a1019f1e Merge branch 'master' into feature_extruder_warning_icon 2021-08-24 17:39:28 +02:00
Jaime van Kessel
2bef85c6c2 Remove weird whitespace
CURA-6096
2021-08-24 14:45:52 +02:00
Jaime van Kessel
e0e8223c5d Move DB handling into specialised classes
This keeps CuraContainerRegistry a lot cleaner, especially when more container types are
added

Cura-6096
2021-08-20 15:40:50 +02:00
Jaime van Kessel
27f0fe8bb9 Ensure that all metadata of profiles is stored
CURA-6096
2021-08-20 14:40:55 +02:00
Jaime van Kessel
6f32809a3a Prepare the inserts before actually doing them
CURA-6096
2021-08-20 13:09:40 +02:00
Jaime van Kessel
5311c949f0 Add variants to the database
CURA-6096
2021-08-20 11:05:37 +02:00
Jaime van Kessel
48ab21ac68 Add functions to get & add variants & qualities from DB
CURA-6096
2021-08-20 10:17:57 +02:00
Jaime van Kessel
3f80fcb5e5 Add first stub for profile database
CURA-6096
2021-08-19 15:20:20 +02:00
Jelle Spijker
2263969d5f
Updated message with message types
Contributes to CURA-8418
2021-07-28 08:45:42 +02:00
Jaime van Kessel
900db57f0f
Update messages to use the message_types
CURA-8418
2021-07-27 11:54:43 +02:00
fieldOfView
9c05d990ea Merge branch 'master' into feature_extruder_warning_icon
# Conflicts:
#	resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml
2021-07-26 14:12:30 +02:00
Ghostkeeper
f82384d93c
Revert "Revert CURA-8055 in the 4.10 branch. This should not have been merged in there."
This reverts commit 4d29de4579.
Effectively this re-applies the changes for CURA-8055 / #9957.
2021-06-24 14:20:38 +02:00
Ghostkeeper
4d29de4579
Revert CURA-8055 in the 4.10 branch. This should not have been merged in there.
Revert "Change file extension to .umm"

This reverts commit 56db7f7144.

Revert "Re-enable compression"

This reverts commit 62bc9be22b.

Revert "Add documentation"

This reverts commit e9031f1aff.

Revert "Fix writing bytes to string-stream"

This reverts commit 66b2825a66.

Revert "Hide button entirely if no export is available"

This reverts commit ec727e1068.

Revert "Basic implementation of exporting all materials in a .zip archive"

This reverts commit bdcaef134f.

Revert "Implement default path for exporting all materials"

This reverts commit e66783664b.

Revert "Implement a sync button and file dialogue to export all materials"

This reverts commit abba3bdd10.

Revert "Add notion of whether printers support the material export archive"

This reverts commit f436cb8e7b.
2021-06-24 14:15:54 +02:00
Ghostkeeper
f436cb8e7b
Add notion of whether printers support the material export archive
Contributes to issue CURA-8055.
2021-06-08 16:50:03 +02:00
Ghostkeeper
2f8f98fcca
Add a log entry for importing, duplicating or removing a material
We encountered an issue yesterday that we had to find in a log file when a user was importing a material. Nothing is shown in the log when importing a material, so it was impossible to find.
Now we'll log this action. It is a direct user action, so info is a good log level.
2021-06-04 02:51:13 +02:00
Ghostkeeper
58369822fc
Clean up invalid quality changes robust to asynchronous changes
It's possible that a profile is no longer in the registry by the time it gets to that point in the list if this clean-up is triggered by the very action of deleting a profile.

Fixes Sentry issue CURA-1T5.
2021-03-16 16:36:01 +01:00
Ghostkeeper
ba5b033499
Don't crash when not able to read maximum file name length
Just use a safe-ish maximum then.

Fixes Sentry issue CURA-1QY.
2021-02-04 17:10:03 +01:00
Ghostkeeper
1b8463ba30
Catch TypeError when parsing setting version
Someone had a list in the setting version, which then crashed Cura.
2021-01-19 14:09:46 +01:00
Ghostkeeper
0788df4797
Add log entry upon exporting container
Quite a salient moment in the log. According to our log levels definitions this must be info since it's the direct result of a user interaction.
2021-01-06 14:11:15 +01:00
fieldOfView
0c668053e5 Add warning icon to show which extruder makes the configuration Not Supported 2020-11-12 14:04:58 +01:00
Remco Burema
9afbc64934
Merge branch '4.8' 2020-11-10 11:31:53 +01:00