mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 19:19:02 +08:00
Code review comments
fixes: CURA-8754
This commit is contained in:
parent
d12659f71f
commit
3e18082db6
@ -429,24 +429,13 @@ UM.Window
|
|||||||
Cura.SecondaryButton
|
Cura.SecondaryButton
|
||||||
{
|
{
|
||||||
id: refreshListButton
|
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
|
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")
|
text: catalog.i18nc("@button", "Refresh List")
|
||||||
iconSource: UM.Theme.getIcon("ArrowDoubleCircleRight")
|
iconSource: UM.Theme.getIcon("ArrowDoubleCircleRight")
|
||||||
onClicked: Cura.API.account.sync(true)
|
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
|
Item
|
||||||
|
Loading…
x
Reference in New Issue
Block a user