mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 16:00:47 -07:00
Merge branch 'master' into CURA-9005_restyle_print_setting_category
This commit is contained in:
commit
60f7b2dccb
16 changed files with 92 additions and 46 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2021 Ultimaker B.V.
|
||||
# Copyright (c) 2022 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import math
|
||||
|
|
@ -31,6 +31,8 @@ Position = NamedTuple("Position", [("x", float), ("y", float), ("z", float), ("f
|
|||
class FlavorParser:
|
||||
"""This parser is intended to interpret the common firmware codes among all the different flavors"""
|
||||
|
||||
MAX_EXTRUDER_COUNT = 16
|
||||
|
||||
def __init__(self) -> None:
|
||||
CuraApplication.getInstance().hideMessageSignal.connect(self._onHideMessage)
|
||||
self._cancelled = False
|
||||
|
|
@ -53,7 +55,7 @@ class FlavorParser:
|
|||
|
||||
def _clearValues(self) -> None:
|
||||
self._extruder_number = 0
|
||||
self._extrusion_length_offset = [0] * 8 # type: List[float]
|
||||
self._extrusion_length_offset = [0] * self.MAX_EXTRUDER_COUNT # type: List[float]
|
||||
self._layer_type = LayerPolygon.Inset0Type
|
||||
self._layer_number = 0
|
||||
self._previous_z = 0 # type: float
|
||||
|
|
@ -355,7 +357,7 @@ class FlavorParser:
|
|||
|
||||
Logger.log("d", "Parsing g-code...")
|
||||
|
||||
current_position = Position(0, 0, 0, 0, [0] * 8)
|
||||
current_position = Position(0, 0, 0, 0, [0] * self.MAX_EXTRUDER_COUNT)
|
||||
current_path = [] #type: List[List[float]]
|
||||
min_layer_number = 0
|
||||
negative_layers = 0
|
||||
|
|
|
|||
|
|
@ -31,8 +31,11 @@ class Marketplace(Extension, QObject):
|
|||
# Not entirely the cleanest code, since the localPackage list also checks the server if there are updates
|
||||
# Since that in turn will trigger notifications to be shown, we do need to construct it here and make sure
|
||||
# that it checks for updates...
|
||||
preferences = CuraApplication.getInstance().getPreferences()
|
||||
preferences.addPreference("info/automatic_plugin_update_check", True)
|
||||
self._local_package_list = LocalPackageList(self)
|
||||
self._local_package_list.checkForUpdates(self._package_manager.local_packages)
|
||||
if preferences.getValue("info/automatic_plugin_update_check"):
|
||||
self._local_package_list.checkForUpdates(self._package_manager.local_packages)
|
||||
|
||||
self._package_manager.installedPackagesChanged.connect(self.checkIfRestartNeeded)
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Item
|
|||
height: UM.Theme.getSize("card").height
|
||||
|
||||
// card icon
|
||||
Image
|
||||
Item
|
||||
{
|
||||
id: packageItem
|
||||
anchors
|
||||
|
|
@ -35,19 +35,36 @@ Item
|
|||
}
|
||||
width: UM.Theme.getSize("card_icon").width
|
||||
height: width
|
||||
sourceSize.height: height
|
||||
sourceSize.width: width
|
||||
source:
|
||||
|
||||
property bool packageHasIcon: packageData.iconUrl != ""
|
||||
|
||||
Image
|
||||
{
|
||||
if (packageData.iconUrl != "")
|
||||
visible: parent.packageHasIcon
|
||||
anchors.fill: parent
|
||||
source: packageData.iconUrl
|
||||
sourceSize.height: height
|
||||
sourceSize.width: width
|
||||
}
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
visible: !parent.packageHasIcon
|
||||
anchors.fill: parent
|
||||
sourceSize.height: height
|
||||
sourceSize.width: width
|
||||
color: UM.Theme.getColor("text")
|
||||
source:
|
||||
{
|
||||
return packageData.iconUrl
|
||||
}
|
||||
switch (packageData.packageType)
|
||||
{
|
||||
case "plugin": return "../images/Plugin.svg";
|
||||
case "material": return "../images/Spool.svg";
|
||||
default: return "../images/placeholder.svg";
|
||||
switch (packageData.packageType)
|
||||
{
|
||||
case "plugin":
|
||||
return "../images/Plugin.svg";
|
||||
case "material":
|
||||
return "../images/Spool.svg";
|
||||
default:
|
||||
return "../images/placeholder.svg";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import QtQuick 2.3
|
|||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Layouts 1.3
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.5 as Cura
|
||||
|
||||
UM.Dialog
|
||||
{
|
||||
|
|
@ -17,12 +18,21 @@ UM.Dialog
|
|||
width: minimumWidth
|
||||
height: minimumHeight
|
||||
title: catalog.i18nc("@title:window", "Configuration Changes")
|
||||
buttonSpacing: UM.Theme.getSize("narrow_margin").width
|
||||
rightButtons:
|
||||
[
|
||||
Button
|
||||
Cura.TertiaryButton
|
||||
{
|
||||
id: cancelButton
|
||||
text: catalog.i18nc("@action:button", "Cancel")
|
||||
onClicked:
|
||||
{
|
||||
overrideConfirmationDialog.reject()
|
||||
}
|
||||
},
|
||||
Cura.PrimaryButton
|
||||
{
|
||||
id: overrideButton
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
text: catalog.i18nc("@action:button", "Override")
|
||||
onClicked:
|
||||
{
|
||||
|
|
@ -49,16 +59,6 @@ UM.Dialog
|
|||
}
|
||||
return true
|
||||
}
|
||||
},
|
||||
Button
|
||||
{
|
||||
id: cancelButton
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
text: catalog.i18nc("@action:button", "Cancel")
|
||||
onClicked:
|
||||
{
|
||||
overrideConfirmationDialog.reject()
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue