diff options
Diffstat (limited to 'pages')
| -rw-r--r-- | pages/AddressBook.qml | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/pages/AddressBook.qml b/pages/AddressBook.qml index 574e7384..168f5b18 100644 --- a/pages/AddressBook.qml +++ b/pages/AddressBook.qml @@ -313,11 +313,12 @@ Rectangle { MoneroComponents.Label { fontSize: 32 wrapMode: Text.WordWrap - text: (root.editEntry ? qsTr("Edit an address") : qsTr("Add an address")) + translationManager.emptyString + text: (root.editEntry ? qsTr("Edit entry") : qsTr("Add an address")) + translationManager.emptyString } MoneroComponents.LineEditMulti { id: addressLine + visible: !root.editEntry Layout.topMargin: 20 KeyNavigation.backtab: deleteButton.visible ? deleteButton: cancelButton KeyNavigation.tab: resolveButton.visible ? resolveButton : descriptionLine @@ -444,7 +445,7 @@ Rectangle { enabled: root.checkInformation(addressLine.text, appWindow.persistentSettings.nettype) onClicked: { console.log("Add") - if (!currentWallet.addressBook.addRow(addressLine.text.trim(),"", descriptionLine.text)) { + if (!root.editEntry && !currentWallet.addressBook.addRow(addressLine.text.trim(),"", descriptionLine.text)) { informationPopup.title = qsTr("Error") + translationManager.emptyString; // TODO: check currentWallet.addressBook.errorString() instead. if(currentWallet.addressBook.errorCode() === AddressBook.Invalid_Address) @@ -457,11 +458,9 @@ Rectangle { informationPopup.onCloseCallback = null informationPopup.open(); } else { - if (root.editEntry) { - currentWallet.addressBook.deleteRow(addressBookListView.currentIndex); - } - root.showAddressBook(); + currentWallet.addressBook.setDescription(addressBookListView.currentIndex, descriptionLine.text); } + root.showAddressBook() } } |
