mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-18 20:28:01 -06:00
Merge branch 'master' into CURA-6447_fix_start_onboarding
This commit is contained in:
commit
d0aee9da3f
15 changed files with 57 additions and 63 deletions
|
@ -65,6 +65,7 @@ Item
|
|||
{
|
||||
id: description
|
||||
text: details.description || ""
|
||||
font: UM.Theme.getFont("default")
|
||||
anchors
|
||||
{
|
||||
top: title.bottom
|
||||
|
|
|
@ -53,7 +53,7 @@ class AuthorsModel(ListModel):
|
|||
|
||||
# Filter on all the key-word arguments.
|
||||
for key, value in self._filter.items():
|
||||
if key is "package_types":
|
||||
if key == "package_types":
|
||||
key_filter = lambda item, value = value: value in item["package_types"] # type: ignore
|
||||
elif "*" in value:
|
||||
key_filter = lambda item, key = key, value = value: self._matchRegExp(item, key, value) # type: ignore
|
||||
|
|
|
@ -112,7 +112,7 @@ class PackagesModel(ListModel):
|
|||
|
||||
# Filter on all the key-word arguments.
|
||||
for key, value in self._filter.items():
|
||||
if key is "tags":
|
||||
if key == "tags":
|
||||
key_filter = lambda item, v = value: v in item["tags"]
|
||||
elif "*" in value:
|
||||
key_filter = lambda candidate, k = key, v = value: self._matchRegExp(candidate, k, v)
|
||||
|
|
|
@ -613,12 +613,12 @@ class Toolbox(QObject, Extension):
|
|||
self._server_response_data[response_type] = json_data["data"]
|
||||
self._models[response_type].setMetadata(self._server_response_data[response_type])
|
||||
|
||||
if response_type is "packages":
|
||||
if response_type == "packages":
|
||||
self._models[response_type].setFilter({"type": "plugin"})
|
||||
self.reBuildMaterialsModels()
|
||||
self.reBuildPluginsModels()
|
||||
self._notifyPackageManager()
|
||||
elif response_type is "authors":
|
||||
elif response_type == "authors":
|
||||
self._models[response_type].setFilter({"package_types": "material"})
|
||||
self._models[response_type].setFilter({"tags": "generic"})
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ from UM.Version import Version
|
|||
|
||||
from . import ClusterUM3OutputDevice, LegacyUM3OutputDevice
|
||||
from .Cloud.CloudOutputDeviceManager import CloudOutputDeviceManager
|
||||
from .Cloud.CloudOutputDevice import CloudOutputDevice # typing
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from PyQt5.QtNetwork import QNetworkReply
|
||||
|
@ -181,7 +182,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
|||
um_network_key = CuraApplication.getInstance().getGlobalContainerStack().getMetaDataEntry("um_network_key")
|
||||
if key == um_network_key:
|
||||
self.getOutputDeviceManager().addOutputDevice(self._discovered_devices[key])
|
||||
self.checkCloudFlowIsPossible()
|
||||
self.checkCloudFlowIsPossible(None)
|
||||
else:
|
||||
self.getOutputDeviceManager().removeOutputDevice(key)
|
||||
if key.startswith("manual:"):
|
||||
|
@ -488,7 +489,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
|||
return True
|
||||
|
||||
## Check if the prerequsites are in place to start the cloud flow
|
||||
def checkCloudFlowIsPossible(self) -> None:
|
||||
def checkCloudFlowIsPossible(self, cluster: Optional[CloudOutputDevice]) -> None:
|
||||
Logger.log("d", "Checking if cloud connection is possible...")
|
||||
|
||||
# Pre-Check: Skip if active machine already has been cloud connected or you said don't ask again
|
||||
|
@ -595,7 +596,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
|||
self._cloud_flow_complete_message.hide()
|
||||
|
||||
# Check for cloud flow again with newly selected machine
|
||||
self.checkCloudFlowIsPossible()
|
||||
self.checkCloudFlowIsPossible(None)
|
||||
|
||||
def _createCloudFlowStartMessage(self):
|
||||
self._start_cloud_flow_message = Message(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue