28338 Commits

Author SHA1 Message Date
Ghostkeeper
c36863da56
Only call failed_callback if provided
Otherwise we'd crash because NoneType can't be called.

Contributes to issue CURA-8539.
2021-11-22 11:59:23 +01:00
Ghostkeeper
f0cbdeb903
Use docstring format for this documentation
Contributes to issue CURA-8539.
2021-11-22 10:50:06 +01:00
Ghostkeeper
9dd251975d
Test for result of callback with a callable
In this case the callback should get called immediately (no wait) so it is safe to test for this callback, albeit slightly implementation-defined.

Contributes to issue CURA-8539.
2021-11-22 10:48:45 +01:00
Ghostkeeper
30d19844f2
Always callback if there is a callback, even if no auth data
Because not having auth data is a reason to return no profile too. Otherwise the other side might wait for a response for a long time.

Contributes to issue CURA-8539.
2021-11-22 10:45:01 +01:00
Ghostkeeper
1636cca601
Add missing return
We're calling back that there is no auth data, so we should stop here and not try to obtain a user profile.

Contributes to issue CURA-8539.
2021-11-22 10:34:39 +01:00
AnnaKang0219
9cc33d5109 modify the heated bed setting
modify the heated bed setting
2021-11-22 10:25:56 +08:00
casper
6be0d58039 Add handling of missing printJob status cases
The `printJob` now also contains a status for detecting aborted prints
that were awaiting cleanup, preventing the need for the additional
checks in the `await_cleanup` status.
2021-11-19 17:22:13 +01:00
Ghostkeeper
ffb891fb69
Fix call to failed_callback
It provides 2 arguments (reply and error) which we both ignore and proceed to call failed_callback. And failed_callback may also be None in which case we don't call anything.

Contributes to issue CURA-8539.
2021-11-19 17:09:33 +01:00
Ghostkeeper
9895015235
Call getAccessTokenUsingRefreshToken asynchronously
Getting into nested inline functions into inline functions here. Let's see what the reviewer thinks of all this!

Contributes to issue CURA-8539.
2021-11-19 17:04:37 +01:00
Ghostkeeper
7091c5f3aa
Make getAuthenticationTokenUsingXYZ asynchronous
As a result, the local webserver now needs to synchronise that with a lock. Otherwise the do_GET function would no longer block, and wouldn't properly be able to return the correct redirect URL.

Contributes to issue CURA-8539.
2021-11-19 16:55:45 +01:00
Ghostkeeper
9b55ae6dda
Remove unused imports of requests
This was the objective, really.

Contributes to issue CURA-8539.
2021-11-19 16:25:50 +01:00
Ghostkeeper
acbbf83510
Deal with absence of callback function
It may be None, so then we don't need to call back. The consumer may just take it from self._user_profile.

Contributes to issue CURA-8539.
2021-11-19 16:23:48 +01:00
Ghostkeeper
a5202b61d2
Don't emit with new profile
The signal can't accept it because it's not a QObject.

Contributes to issue CURA-8539.
2021-11-19 16:22:41 +01:00
Ghostkeeper
bfb8440a04
Get user profile asynchronously when restoring from preferences
Do not stop the start-up process for it. Let the callback handle the updating if necessary.

Contributes to issue CURA-8539.
2021-11-19 16:20:00 +01:00
Ghostkeeper
92437a920d
Store account information asynchronously when completing request
And make the PyQt properties listen to the signal of completion.

Contributes to issue CURA-8539.
2021-11-19 16:02:25 +01:00
Ghostkeeper
591a2f89b8
Make getUserProfile return profile asynchronously
All via callbacks. Quite a mess.

Contributes to issue CURA-8539.
2021-11-19 15:29:29 +01:00
Remco Burema
c8b491e9e7
(High) limits for number of walls to prevent engine crash.
The engine would reserve space for each outline that should be there according to the count, not for each wall that was actually printed. Values of 999999 where chosen after discussion for _some_ of these (but not anything to do wit hskirt-brim, since we use those in the frontend for dissalowed areas) becasue then you can just fill a number of nines to get a completely 'walled' model printed.
2021-11-19 14:46:24 +01:00
Ghostkeeper
240e154be7
Merge branch 'feature_extruder_warning_icon' of https://github.com/fieldOfView/Cura into fieldOfView-feature_extruder_warning_icon 2021-11-19 14:13:49 +01:00
fieldOfView
e537fa562e Hide badge for disabled extruders
A configuration error or warning in a disabled extruder does not affect slicing or the available profiles for other extruder
2021-11-19 14:11:37 +01:00
Ghostkeeper
6601728741
Merge branch 'feature_extruder_warning_icon' of https://github.com/fieldOfView/Cura into fieldOfView-feature_extruder_warning_icon 2021-11-19 13:48:45 +01:00
fieldOfView
c805aac3cc Deactivate tooltip hover if there is no tooltip to show 2021-11-19 13:43:34 +01:00
Jelle Spijker
05c0857cb2
Add Certified icon
Contributes to CURA-8562
2021-11-19 11:21:30 +01:00
Jelle Spijker
7fd9578599
Unified tooltip description
Contributes to CURA-8562
2021-11-19 11:21:29 +01:00
Jelle Spijker
eb3083c84d
use differentiate icon for Ultimaker controlled material/plugin
Materials can be certified, while plugins can be verified.
Added packageType to the model such that the card knows which icon
to use.

Contributes to CURA-8562
2021-11-19 11:21:29 +01:00
Jelle Spijker
584411e59e
Moved comments
if they're inline they mess up the QML syntax highlighter in PyCharm
2021-11-19 11:21:21 +01:00
bodyboarder2528
1d44ebd5e0 Update creality_cr100.def 2021-11-19 09:26:17 +11:00
Ghostkeeper
920d9b9d44
Make _parseJWT asynchronous as well
Now it calls checkToken correctly. However now this _parseJWT is not called correctly since there are things calling this one in an attempt to be synchronous again.
There is the additional issue that we can't call getAccessTokenUsingRefreshToken synchronously now, because this runs on the main thread and it will then block the main thread until the request is made, which is never because the request is also done on the main thread via Qt's event loop.

Contributes to issue CURA-8539.
2021-11-18 17:33:39 +01:00
Ghostkeeper
aff0764c1d
Add failed callback for when the request fails
Maybe we should add a parameter to this to respond with an error message. But maybe later.

Contributes to issue CURA-8539.
2021-11-18 17:19:05 +01:00
Ghostkeeper
a9990eaa75
Make parseJWT asynchronous
This involves returning the user profile via a callback.
No longer use the Requests library, which doesn't properly use the SSL certificates locally on the computer like the QNetworkManager does.

Contributes to issue CURA-8539.
2021-11-18 17:11:27 +01:00
Remco Burema
4a6f6475ee
Merge branch '4.12' 2021-11-18 16:05:50 +01:00
Jelle Spijker
0fb78126d5
Merge pull request #10871 from Ultimaker/CURA-8559_mp_searchbar_fixes
[CURA-8559] (New-)Marketplace Search-Bar UX Fixes
2021-11-18 11:47:53 +01:00
Remco Burema
26ad9766df
Merge pull request #10872 from Ultimaker/update-change-log
Update change log
4.12.1
2021-11-18 11:44:18 +01:00
Ghostkeeper
d6f8984cf0
Use integer positions for fixed items too
Pynest2d requires it. It seems the SIP version we're using is lenient for this, but newer SIP versions are not.

Fixes #10801.
2021-11-18 11:44:09 +01:00
fvrmr
d569742800 Update change log 2021-11-18 11:42:04 +01:00
Karl Nilsson
e0e227404f
Fix picking pixel on integer indices
The QImage.pixel() function should only get integers.
In theory an input position of -2,-2 would get rounded to 0 now. However that shouldn't occur because the user can't click outside of the window. And if it does occur, it's not really a problem either that it's theoretically picking a position inside of the window when you click slightly next to it.

Fixes #10785.
2021-11-18 11:36:20 +01:00
fvrmr
d266a9c8a1 Update change log
Updated the change log with two bug fixes
2021-11-18 11:25:13 +01:00
Ghostkeeper
3466404782
Expand limits for flow and 2nd and 3rd layers of bridging too
We removed the limit of density for the first bridging layer, but there are more settings for that, and there's a similar arbitrary limit for flow in place.

Contributes to issue CURA-8639 and #10736.
2021-11-18 11:10:09 +01:00
fieldOfView
9ebd8524ad Use badge icons 2021-11-18 10:53:35 +01:00
fieldOfView
77cfd8218a Add warning and error badge icons 2021-11-18 10:23:53 +01:00
Remco Burema
dcb9456848
Fix CApitalization and spurious space.
part of CURA-8561
2021-11-18 08:44:06 +01:00
Remco Burema
cd255b0ae5
Search Marketplace: Change message if no results found.
part of CURA-8559
2021-11-18 08:15:26 +01:00
Remco Burema
307d751c2d
Fix white rectangles in dark mode and height of search-bar.
part of CURA-8559
2021-11-18 08:14:04 +01:00
fieldOfView
c6b6af668d Fix shader compilation on some GPUs
Some GPUs (rightly) complain about the difference between a float and an int. Fixes #10837
2021-11-18 08:04:14 +01:00
杜建树
05a2fa88f0 Add new Mingda printers(X,MAX,PRO) 2021-11-18 14:38:52 +08:00
Jelle Spijker
52d639f980
fixed missing , in json 2021-11-17 19:50:15 +01:00
Jaime van Kessel
6a988c8fa0 Remove incorrect authors of profiles
Ultimaker didn't make these profiles, so it shouldn't be listed here
2021-11-17 17:01:30 +01:00
Remco Burema
71c6df8829
Fix capitalization in what (should) refer(s) to a key-value.
CURA-8701
2021-11-17 14:35:29 +01:00
Remco Burema
291d047fac
Revert "fixed top bottom pattern zigzag in profiles"
This reverts commit 3abbcc99c07b3b434a95183968e2b2e1cf7664ab.
2021-11-17 14:35:28 +01:00
Ghostkeeper
f1c763ad9f
Use HttpRequestManager to acquire new tokens
This is a re-write from a previous attempt. Instead of requests, which doesn't properly use SSL certificates installed on the computer among other things, we'll now use the HttpRequestManager which uses QNetworkManager under the hood and properly uses system settings.
The QNetworkManager is asynchronous which would normally be very nice, but due to the nature of this call we want to make it synchronous so we'll use a lock here.

Contributes to issue CURA-8539.
2021-11-17 14:32:53 +01:00
Jaime van Kessel
34aa7240d4 Merge branch 'PP-55_reduce-cross3D-top-layer-bridge-distance_Arachne' of github.com:Ultimaker/Cura into libArachne_rebased 2021-11-17 14:25:57 +01:00