7628 Commits

Author SHA1 Message Date
Jaime van Kessel
c497e61d9d Merge branch 'feature_single_instance_clear_before_load' of https://github.com/fieldOfView/Cura 2021-09-15 16:18:54 +02:00
Konstantinos Karmas
6d9978e8f3 Always set the project name as the one provided by the user
There was an inconsistent behavior between saving a project file to disk (where the printer short name was readded after saving) and saving to the DigitalLibrary (where the printer short was NOT added again).

This commit fixes that by making sure that whatever the user put as the name of the file, will be the name of the project within Cura.

CURA-8566
2021-09-15 14:37:53 +02:00
Konstantinos Karmas
52c224c779 Revert "Revert "Only change project name when saving to project files.""
This reverts commit 9e2b556ce8f28294f9b44a3d8801af42043d3956.
2021-09-15 12:26:30 +02:00
Konstantinos Karmas
87add2c8de Revert "Revert "Use optional last output (file) name from output-dev to set project name.""
This reverts commit 24ff3692bd5b73828a1c5a58cdd55400cdddad9c.
2021-09-15 12:26:18 +02:00
Konstantinos Karmas
98eba28885 Revert "Revert "Set the job name whenever the workspaceLoaded is called""
This reverts commit a6a69c249cfc96e19ace64ec01aa7e4fc07a76d1.
2021-09-15 12:25:13 +02:00
Ghostkeeper
453b666b1d
Increment setting_version to 18
We now have version 18, where Flsun Super Racer has customised profiles.
Nothing changes in the built-in profiles. It only needs a change in the machine instances.

Contributes to issue CURA-8510.
2021-09-14 16:32:43 +02:00
Jaime van Kessel
cfb147853e Merge branch 'master' of github.com:Ultimaker/Cura into libArachne_rebased 2021-09-13 14:57:40 +02:00
Ghostkeeper
a6a69c249c
Revert "Set the job name whenever the workspaceLoaded is called"
This reverts commit 6ad358a55db7dfc4825233a7e453bab31931fba0.
2021-09-10 16:47:20 +02:00
Ghostkeeper
24ff3692bd
Revert "Use optional last output (file) name from output-dev to set project name."
This reverts commit c2c53d51c1954315324982bd916b8aad5c19946d.
2021-09-10 16:46:53 +02:00
Ghostkeeper
9e2b556ce8
Revert "Only change project name when saving to project files."
This reverts commit b97920e5b155caaab6a8b3bb167853a00ae4b604.
2021-09-10 16:46:39 +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 571a051041b7c126ca942055961c7714312a967f.
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
Ghostkeeper
d5481e4ce8
Merge branch 'CURA-8401_use_secrets_instead_of_random' 2021-09-03 16:06:23 +02:00
Evangelos Trantos
e8be611a0d
Merge pull request #10360 from Ultimaker/CURA-8509_add_extruder_to_current_version
Add extruder to current version for version upgrade script
2021-09-03 15:30:50 +02:00
Jaime van Kessel
8b5cfc9c28 Use token_hex from secrets instead of choice
CURA-8401
2021-09-03 09:57:04 +02: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
Jaime van Kessel
e24a844d17 Use secrets instead of random
Since we're no longer stuck on python 3.5, we can use secrets instead of random
which provides better randomness.

CURA-8401
SEC-207
2021-09-02 14:25:57 +02:00
jelle Spijker
4067d9d607
Fixed typing
Contributes to CURA-6096
2021-09-02 10:17:40 +02:00
Jaime van Kessel
3caee3f143
Merge pull request #10328 from Ultimaker/CURA-8358_Retain_last_saved_filename
Retain the last saved filename after saving a file
2021-09-02 09:54:35 +02:00
jelle Spijker
f80e1ec279
Updated documentation
Contributes to CURA-6096
2021-09-01 18:58:03 +02:00
Remco Burema
b97920e5b1
Only change project name when saving to project files.
CURA-8358
2021-09-01 18:11:10 +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
Remco Burema
0b114876ef
Make this run from source again on Windows. 2021-09-01 16:56:47 +02:00
Remco Burema
c2c53d51c1
Use optional last output (file) name from output-dev to set project name.
Instead of relying on the filename emitted when the workspace is changed. This is done so the user can also change the project name when saving to an output device, such as a local file, or the digital library, that supports changeing the (file)name.

CURA-8358
2021-09-01 16:04:05 +02:00
Jaime van Kessel
42948c376f Add extruder to current version for version upgrade script
This should remove the Unable to upgrade file of type extruder of version 2
messages

CURA-8509
2021-08-30 11:16:49 +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
Konstantinos Karmas
6ad358a55d Set the job name whenever the workspaceLoaded is called
CURA-8358
2021-08-23 17:07:36 +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
Jaime van Kessel
0348293f87 Merge branch '4.11' of github.com:Ultimaker/Cura 2021-08-19 10:01:20 +02:00
Ghostkeeper
1c9b3a0784
Merge branch 'CURA-8490_Make_sure_no_keyring_backend_is_available_on_Linux' into 4.11 2021-08-19 09:33:33 +02:00
Remco Burema
898abc92a8
Update SDK 7.6 -> 7.7 because of API changes in 4.11
CURA-8491
2021-08-18 16:56:29 +02:00
Konstantinos Karmas
d218b0bff9 Remove check for "frozen" when setting the keyring backend
There is no need to have a different behavior from source compared to frozen builds when it comes to the keyring.

CURA-8490
2021-08-18 16:54:28 +02:00
Konstantinos Karmas
c5a956068f Fix mypy complaint
The `Keyring` is already imported from MacOS, so it's best to rename the fail on for Linux.

CURA-8490
2021-08-18 12:02:13 +02:00
Konstantinos Karmas
b1dc38f126 Don't load a keyring backend on Linux
We do not support it on Linux and it can cause problems if there is a system keyring configured.

CURA-8490
2021-08-18 11:57:09 +02:00
Konstantinos Karmas
e5374ada3b Merge branch '4.11' 2021-08-17 15:59:53 +02:00
Konstantinos Karmas
e5856bf6bc Log the connection error message produced by the request 2021-08-17 15:52:12 +02:00
Jelle Spijker
4986861727
Merge branch 'master' into libArachne_rebased 2021-08-12 18:50:29 +02:00
Jaime van Kessel
1f523053d9 Add even more logging to authorization service 2021-08-12 15:35:14 +02:00