diff --git a/plugins/GCodeReader/FlavorParser.py b/plugins/GCodeReader/FlavorParser.py index ac24ce3184..555d9d594e 100644 --- a/plugins/GCodeReader/FlavorParser.py +++ b/plugins/GCodeReader/FlavorParser.py @@ -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 diff --git a/plugins/Marketplace/Marketplace.py b/plugins/Marketplace/Marketplace.py index 2d98947572..b9632e5fb0 100644 --- a/plugins/Marketplace/Marketplace.py +++ b/plugins/Marketplace/Marketplace.py @@ -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) diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index ec25eb8abb..90d1d549e2 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -79,7 +79,7 @@ Item { id: showTroubleShootingAction onTriggered: Qt.openUrlExternally("https://ultimaker.com/en/troubleshooting?utm_source=cura&utm_medium=software&utm_campaign=dropdown-troubleshooting") - text: catalog.i18nc("@action:inmenu", "Show Online Troubleshooting Guide") + text: catalog.i18nc("@action:inmenu", "Show Online Troubleshooting") } Action diff --git a/resources/qml/MainWindow/ApplicationMenu.qml b/resources/qml/MainWindow/ApplicationMenu.qml index bf3781331a..3598447d88 100644 --- a/resources/qml/MainWindow/ApplicationMenu.qml +++ b/resources/qml/MainWindow/ApplicationMenu.qml @@ -34,14 +34,16 @@ Item { text: menuBarItem.text.replace(new RegExp("&([A-Za-z])"), function (match, character) { - return `${character}`; + return `${character}` }) horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } - + leftPadding: UM.Theme.getSize("default_margin").width + rightPadding: UM.Theme.getSize("default_margin").width background: Rectangle { + color: menuBarItem.highlighted ? UM.Theme.getColor("background_2") : "transparent" } } diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index 1d29b691ed..185ca44eac 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -82,10 +82,10 @@ UM.ManagementPage enabled: !Cura.MachineManager.stacksHaveErrors visible: base.canCreateProfile - + tooltip: catalog.i18nc("@action:tooltip", "Create new profile from current settings/overrides") onClicked: { - createQualityDialog.object = Cura.ContainerManager.makeUniqueName(base.currentItem.name) + createQualityDialog.object = Cura.ContainerManager.makeUniqueName("") createQualityDialog.open() createQualityDialog.selectText() } @@ -105,6 +105,14 @@ UM.ManagementPage spacing: UM.Theme.getSize("default_margin").height visible: base.currentItem != null + UM.Label + { + anchors.left: parent.left + anchors.right: parent.right + text: catalog.i18nc("@action:label", "Some settings from current profile were overwritten.") + visible: currentSettingsActions.visible + } + Flow { id: currentSettingsActions @@ -112,11 +120,14 @@ UM.ManagementPage visible: base.hasCurrentItem && base.currentItem.name == Cura.MachineManager.activeQualityOrQualityChangesName && base.currentItem.intent_category == Cura.MachineManager.activeIntentCategory + spacing: UM.Theme.getSize("default_margin").width + Cura.SecondaryButton { - text: catalog.i18nc("@action:button", "Update profile with current settings/overrides") + text: catalog.i18nc("@action:button", "Update profile.") enabled: Cura.MachineManager.hasUserSettings && objectList.currentIndex && !objectList.currentIndex.is_read_only onClicked: Cura.ContainerManager.updateQualityChanges() + tooltip: catalog.i18nc("@action:tooltip", "Update profile with current settings/overrides") } Cura.SecondaryButton @@ -145,7 +156,8 @@ UM.ManagementPage UM.TabRow { id: profileExtruderTabs - UM.TabRowButton // One extra tab for the global settings. + // One extra tab for the global settings. + UM.TabRowButton { text: catalog.i18nc("@title:tab", "Global Settings") } @@ -196,6 +208,8 @@ UM.ManagementPage Item { + id: content_item + anchors.fill: parent // This connection makes sure that we will switch to the correct quality after the model gets updated Connections { diff --git a/resources/qml/SecondaryButton.qml b/resources/qml/SecondaryButton.qml index d8027af3fc..068d65c7b8 100644 --- a/resources/qml/SecondaryButton.qml +++ b/resources/qml/SecondaryButton.qml @@ -12,7 +12,8 @@ Cura.ActionButton color: UM.Theme.getColor("secondary_button") textColor: UM.Theme.getColor("secondary_button_text") outlineColor: UM.Theme.getColor("border_accent_1") - disabledColor: UM.Theme.getColor("action_button_disabled") + disabledColor: UM.Theme.getColor("secondary_button") textDisabledColor: UM.Theme.getColor("action_button_disabled_text") hoverColor: UM.Theme.getColor("secondary_button_hover") + outlineDisabledColor: UM.Theme.getColor("action_button_disabled_text") } \ No newline at end of file diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 2ab98081e7..a2a5e0c36b 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -180,7 +180,7 @@ Item ListView { id: contents - + maximumFlickVelocity: 1000 anchors { top: filterContainer.bottom diff --git a/resources/qml/Widgets/ComboBox.qml b/resources/qml/Widgets/ComboBox.qml index 5d31348597..698eb4ec10 100644 --- a/resources/qml/Widgets/ComboBox.qml +++ b/resources/qml/Widgets/ComboBox.qml @@ -57,9 +57,7 @@ ComboBox contentItem: UM.Label { id: contentLabel - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width - anchors.verticalCenter: parent.verticalCenter + leftPadding: UM.Theme.getSize("setting_unit_margin").width + UM.Theme.getSize("default_margin").width anchors.right: downArrow.left wrapMode: Text.NoWrap text: diff --git a/resources/qml/Widgets/MenuSeparator.qml b/resources/qml/Widgets/MenuSeparator.qml index ad79fccd6d..b39f958c69 100644 --- a/resources/qml/Widgets/MenuSeparator.qml +++ b/resources/qml/Widgets/MenuSeparator.qml @@ -18,4 +18,5 @@ MenuSeparator implicitHeight: UM.Theme.getSize("default_lining").height color: UM.Theme.getColor("setting_control_border") } + height: visible ? implicitHeight: 0 } \ No newline at end of file