mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
qt, refactor: Keep EditAddressDialog in the main event loop
This commit is contained in:
parent
59f7ba4fd7
commit
6f6fde30e7
2 changed files with 12 additions and 12 deletions
|
@ -182,14 +182,14 @@ void AddressBookPage::onEditAction()
|
||||||
if(indexes.isEmpty())
|
if(indexes.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
EditAddressDialog dlg(
|
auto dlg = new EditAddressDialog(
|
||||||
tab == SendingTab ?
|
tab == SendingTab ?
|
||||||
EditAddressDialog::EditSendingAddress :
|
EditAddressDialog::EditSendingAddress :
|
||||||
EditAddressDialog::EditReceivingAddress, this);
|
EditAddressDialog::EditReceivingAddress, this);
|
||||||
dlg.setModel(model);
|
dlg->setModel(model);
|
||||||
QModelIndex origIndex = proxyModel->mapToSource(indexes.at(0));
|
QModelIndex origIndex = proxyModel->mapToSource(indexes.at(0));
|
||||||
dlg.loadRow(origIndex.row());
|
dlg->loadRow(origIndex.row());
|
||||||
dlg.exec();
|
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddressBookPage::on_newAddress_clicked()
|
void AddressBookPage::on_newAddress_clicked()
|
||||||
|
|
|
@ -500,22 +500,22 @@ void TransactionView::editLabel()
|
||||||
// Determine type of address, launch appropriate editor dialog type
|
// Determine type of address, launch appropriate editor dialog type
|
||||||
QString type = modelIdx.data(AddressTableModel::TypeRole).toString();
|
QString type = modelIdx.data(AddressTableModel::TypeRole).toString();
|
||||||
|
|
||||||
EditAddressDialog dlg(
|
auto dlg = new EditAddressDialog(
|
||||||
type == AddressTableModel::Receive
|
type == AddressTableModel::Receive
|
||||||
? EditAddressDialog::EditReceivingAddress
|
? EditAddressDialog::EditReceivingAddress
|
||||||
: EditAddressDialog::EditSendingAddress, this);
|
: EditAddressDialog::EditSendingAddress, this);
|
||||||
dlg.setModel(addressBook);
|
dlg->setModel(addressBook);
|
||||||
dlg.loadRow(idx);
|
dlg->loadRow(idx);
|
||||||
dlg.exec();
|
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Add sending address
|
// Add sending address
|
||||||
EditAddressDialog dlg(EditAddressDialog::NewSendingAddress,
|
auto dlg = new EditAddressDialog(EditAddressDialog::NewSendingAddress,
|
||||||
this);
|
this);
|
||||||
dlg.setModel(addressBook);
|
dlg->setModel(addressBook);
|
||||||
dlg.setAddress(address);
|
dlg->setAddress(address);
|
||||||
dlg.exec();
|
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue