mirror of
https://github.com/monero-project/monero-gui
synced 2024-11-25 10:47:19 +01:00
Fix a few uses of undefined data on startup and exit
This commit is contained in:
parent
084c1c84f3
commit
22de9db4e1
@ -384,8 +384,9 @@ Rectangle {
|
|||||||
RemoteNodeEdit {
|
RemoteNodeEdit {
|
||||||
id: remoteNodeEdit
|
id: remoteNodeEdit
|
||||||
Layout.minimumWidth: 100 * scaleRatio
|
Layout.minimumWidth: 100 * scaleRatio
|
||||||
daemonAddrText: persistentSettings.remoteNodeAddress.split(":")[0].trim()
|
property var rna: persistentSettings.remoteNodeAddress
|
||||||
daemonPortText: (persistentSettings.remoteNodeAddress.split(":")[1].trim() == "") ? "18081" : persistentSettings.remoteNodeAddress.split(":")[1]
|
daemonAddrText: rna.search(":") != -1 ? rna.split(":")[0].trim() : ""
|
||||||
|
daemonPortText: rna.search(":") != -1 ? (rna.split(":")[1].trim() == "") ? "18081" : rna.split(":")[1] : ""
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
persistentSettings.remoteNodeAddress = remoteNodeEdit.getAddress();
|
persistentSettings.remoteNodeAddress = remoteNodeEdit.getAddress();
|
||||||
console.log("setting remote node to " + persistentSettings.remoteNodeAddress)
|
console.log("setting remote node to " + persistentSettings.remoteNodeAddress)
|
||||||
@ -520,7 +521,7 @@ Rectangle {
|
|||||||
id: restoreHeightText
|
id: restoreHeightText
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
property var txt: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C}</style>" + qsTr("Wallet creation height: ") + currentWallet.walletCreationHeight + translationManager.emptyString
|
property var txt: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C}</style>" + qsTr("Wallet creation height: ") + (currentWallet ? currentWallet.walletCreationHeight : "") + translationManager.emptyString
|
||||||
property var linkTxt: qsTr(" <a href='#'>(Click to change)</a>") + translationManager.emptyString
|
property var linkTxt: qsTr(" <a href='#'>(Click to change)</a>") + translationManager.emptyString
|
||||||
text: (typeof currentWallet == "undefined") ? "" : txt + linkTxt
|
text: (typeof currentWallet == "undefined") ? "" : txt + linkTxt
|
||||||
|
|
||||||
@ -537,7 +538,7 @@ Rectangle {
|
|||||||
id: restoreHeight
|
id: restoreHeight
|
||||||
Layout.preferredWidth: 80
|
Layout.preferredWidth: 80
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: currentWallet.walletCreationHeight
|
text: currentWallet ? currentWallet.walletCreationHeight : "0"
|
||||||
validator: IntValidator {
|
validator: IntValidator {
|
||||||
bottom:0
|
bottom:0
|
||||||
}
|
}
|
||||||
@ -589,7 +590,7 @@ Rectangle {
|
|||||||
|
|
||||||
TextBlock {
|
TextBlock {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: (typeof currentWallet == "undefined") ? "" : qsTr("Wallet log path: ") + currentWallet.walletLogPath + translationManager.emptyString
|
text: (!currentWallet) ? "" : qsTr("Wallet log path: ") + currentWallet.walletLogPath + translationManager.emptyString
|
||||||
}
|
}
|
||||||
TextBlock {
|
TextBlock {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@ -597,7 +598,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
TextBlock {
|
TextBlock {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: (typeof currentWallet == "undefined") ? "" : qsTr("Daemon log path: ") + currentWallet.daemonLogPath + translationManager.emptyString
|
text: (!currentWallet) ? "" : qsTr("Daemon log path: ") + currentWallet.daemonLogPath + translationManager.emptyString
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,8 +185,9 @@ ColumnLayout {
|
|||||||
Layout.minimumWidth: 300 * scaleRatio
|
Layout.minimumWidth: 300 * scaleRatio
|
||||||
opacity: remoteNode.checked
|
opacity: remoteNode.checked
|
||||||
id: remoteNodeEdit
|
id: remoteNodeEdit
|
||||||
daemonAddrText: persistentSettings.remoteNodeAddress.split(":")[0].trim()
|
property var rna: persistentSettings.remoteNodeAddress
|
||||||
daemonPortText: (persistentSettings.remoteNodeAddress.split(":")[1].trim() == "") ? "18081" : persistentSettings.remoteNodeAddress.split(":")[1]
|
daemonAddrText: rna.search(":") != -1 ? rna.split(":")[0].trim() : ""
|
||||||
|
daemonPortText: rna.search(":") != -1 ? (rna.split(":")[1].trim() == "") ? "18081" : persistentSettings.remoteNodeAddress.split(":")[1] : ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user