Merge pull request #1904

b758c79 AddressBook: hide 'Add' form when invoked from 'Send' tab (xiphon)
This commit is contained in:
luigi1111
2019-01-21 15:01:25 -06:00
3 changed files with 37 additions and 18 deletions

View File

@@ -34,6 +34,7 @@ ListView {
id: listView
clip: true
boundsBehavior: ListView.StopAtBounds
property bool selectAndSend: false
footer: Rectangle {
height: 127
@@ -57,6 +58,11 @@ ListView {
color: "transparent"
z: listView.count - index
function collapseDropdown() { dropdown.expanded = false }
function doSend() {
console.log("Sending to: ", address +" "+ paymentId);
middlePanel.sendTo(address, paymentId, description);
leftPanel.selectItem(middlePanel.state)
}
Text {
id: descriptionText
@@ -148,6 +154,7 @@ ListView {
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: 5
dataModel: dropModel
visible: !listView.selectAndSend
z: 1
onExpandedChanged: {
if(expanded) {
@@ -163,9 +170,7 @@ ListView {
appWindow.showStatusMessage(qsTr("Address copied to clipboard"),3)
}
else if(option === 1){
console.log("Sending to: ", address +" "+ paymentId);
middlePanel.sendTo(address, paymentId, description);
leftPanel.selectItem(middlePanel.state)
doSend()
} else if(option === 2){
console.log("Delete: ", rowId);
currentWallet.addressBookModel.deleteRow(rowId);
@@ -180,5 +185,14 @@ ListView {
height: 1
color: "#404040"
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
visible: listView.selectAndSend
onClicked: {
doSend();
}
}
}
}