From fc7207e77e47f906626c7a5de8334df6936ea924 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Wed, 6 Sep 2017 12:17:40 +0200 Subject: [PATCH] Remove "Sync" button CURA-4211 --- cura/CuraApplication.py | 6 -- .../UM3NetworkPrinting/DiscoverUM3Action.py | 1 - resources/qml/SidebarHeader.qml | 65 ------------------- 3 files changed, 72 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 0b8705799f..ee1c1aeec6 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -125,8 +125,6 @@ class CuraApplication(QtApplication): # Cura will always show the Add Machine Dialog upon start. stacksValidationFinished = pyqtSignal() # Emitted whenever a validation is finished - syncConfigurationFromPrinter = pyqtSignal() # Emitted when the user wants to sync configuration from printer - def __init__(self): # this list of dir names will be used by UM to detect an old cura directory for dir_name in ["extruders", "machine_instances", "materials", "plugins", "quality", "user", "variants"]: @@ -1395,7 +1393,3 @@ class CuraApplication(QtApplication): node = node.getParent() Selection.add(node) - - @pyqtSlot() - def startSyncingConfigurationFromPrinter(self): - self.syncConfigurationFromPrinter.emit() diff --git a/plugins/UM3NetworkPrinting/DiscoverUM3Action.py b/plugins/UM3NetworkPrinting/DiscoverUM3Action.py index ff222b6aeb..af1a556892 100644 --- a/plugins/UM3NetworkPrinting/DiscoverUM3Action.py +++ b/plugins/UM3NetworkPrinting/DiscoverUM3Action.py @@ -26,7 +26,6 @@ class DiscoverUM3Action(MachineAction): self.__additional_components_view = None Application.getInstance().engineCreatedSignal.connect(self._createAdditionalComponentsView) - Application.getInstance().syncConfigurationFromPrinter.connect(self.loadConfigurationFromPrinter) self._last_zeroconf_event_time = time.time() self._zeroconf_change_grace_period = 0.25 # Time to wait after a zeroconf service change before allowing a zeroconf reset diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 0e78cc336d..a12274ca35 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -47,71 +47,6 @@ Column color: UM.Theme.getColor("text") visible: extruderSelectionRow.visible } - - Button - { - id: syncMachineButton - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - text: catalog.i18nc("@button:action", "Sync") - visible: extruderSelectionRow.visible - - property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0 - enabled: printerConnected - - onClicked: - { - CuraApplication.startSyncingConfigurationFromPrinter(); - } - - style: ButtonStyle - { - background: Rectangle - { - implicitWidth: UM.Theme.getSize("button").width * 1.1 - implicitHeight: UM.Theme.getSize("sidebar_tabs").height / 3 - color: "transparent" - } - label: Item - { - implicitWidth: UM.Theme.getSize("button").width * 1.1 - implicitHeight: UM.Theme.getSize("sidebar_tabs").height / 3 - Label - { - id: labelText - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_lining").width - anchors.right: downArrow.left - anchors.rightMargin: UM.Theme.getSize("default_margin").width / 2 - anchors.top: parent.top - - text: control.text - font: UM.Theme.getFont("default") - color: control.hovered ? UM.Theme.getColor("sync_button_text_hovered") : UM.Theme.getColor("sync_button_text") - - elide: Text.ElideRight; - verticalAlignment: Text.AlignVCenter; - } - - UM.RecolorImage - { - id: downArrow - anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("default_lining").width * 2 - anchors.top: labelText.top - anchors.topMargin: UM.Theme.getSize("default_margin").height / 3 - - source: UM.Theme.getIcon("arrow_bottom") - width: UM.Theme.getSize("standard_arrow").width - height: UM.Theme.getSize("standard_arrow").height - sourceSize.width: width + 5 - sourceSize.height: width + 5 - - color: control.hovered ? UM.Theme.getColor("sync_button_text_hovered") : UM.Theme.getColor("sync_button_text") - } - } - } - } } Item