From 3e18082db610570bede2724aba09367f868fd4e7 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 11 Jul 2023 11:45:37 +0200 Subject: [PATCH] Code review comments fixes: CURA-8754 --- .../Materials/MaterialsSyncDialog.qml | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml b/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml index a82789d01c..8fa2f72e60 100644 --- a/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml +++ b/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml @@ -429,24 +429,13 @@ UM.Window Cura.SecondaryButton { id: refreshListButton - property int accountState: Cura.API.account.syncState - readonly property int _AccountSyncState_SYNCING: 0 - readonly property int _AccountSyncState_SUCCESS: 1 Layout.alignment: Qt.AlignVCenter + readonly property int _AccountSyncState_SYNCING: 0 + visible: Cura.API.account.syncState != _AccountSyncState_SYNCING + enabled: visible text: catalog.i18nc("@button", "Refresh List") iconSource: UM.Theme.getIcon("ArrowDoubleCircleRight") onClicked: Cura.API.account.sync(true) - - onAccountStateChanged: { - if (Cura.API.account.syncState == _AccountSyncState_SYNCING) - { - refreshListButton.visible = false; - } - else if (Cura.API.account.syncState == _AccountSyncState_SUCCESS) - { - refreshListButton.visible = true; - } - } } Item