From d21c22b444fa788590923a5f7aa106f9e2b9f9a3 Mon Sep 17 00:00:00 2001 From: xiphon Date: Mon, 2 Mar 2020 10:35:36 +0000 Subject: [PATCH] SettingsNode: blockchain location 'Reset' button --- pages/settings/SettingsNode.qml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pages/settings/SettingsNode.qml b/pages/settings/SettingsNode.qml index e00cb849..9c6714f6 100644 --- a/pages/settings/SettingsNode.qml +++ b/pages/settings/SettingsNode.qml @@ -382,14 +382,12 @@ Rectangle{ labelFontSize: 14 property string style: "" labelText: qsTr("Blockchain location") + style + " (%1)".arg(qsTr("Change")) + translationManager.emptyString + labelButtonText: qsTr("Reset") + translationManager.emptyString + labelButtonVisible: text placeholderText: qsTr("(default)") + translationManager.emptyString placeholderFontSize: 15 readOnly: true - text: { - if(persistentSettings.blockchainDataDir.length > 0){ - return persistentSettings.blockchainDataDir; - } else { return "" } - } + text: persistentSettings.blockchainDataDir addressValidation: false onInputLabelLinkActivated: { //mouse.accepted = false @@ -399,6 +397,7 @@ Rectangle{ blockchainFileDialog.open(); blockchainFolder.focus = true; } + onLabelButtonClicked: persistentSettings.blockchainDataDir = "" } }