@@ -158,7 +158,6 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
158158 QAction *copyTxIDAction = new QAction (tr (" Copy transaction ID" ), this );
159159 QAction *copyTxHexAction = new QAction (tr (" Copy raw transaction" ), this );
160160 QAction *copyTxPlainText = new QAction (tr (" Copy full transaction details" ), this );
161- QAction *editLabelAction = new QAction (tr (" Edit label" ), this );
162161 QAction *showDetailsAction = new QAction (tr (" Show transaction details" ), this );
163162
164163 contextMenu = new QMenu (this );
@@ -173,7 +172,6 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
173172 contextMenu->addSeparator ();
174173 contextMenu->addAction (bumpFeeAction);
175174 contextMenu->addAction (abandonAction);
176- contextMenu->addAction (editLabelAction);
177175
178176 connect (dateWidget, static_cast <void (QComboBox::*)(int )>(&QComboBox::activated), this , &TransactionView::chooseDate);
179177 connect (typeWidget, static_cast <void (QComboBox::*)(int )>(&QComboBox::activated), this , &TransactionView::chooseType);
@@ -194,7 +192,6 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
194192 connect (copyTxIDAction, &QAction::triggered, this , &TransactionView::copyTxID);
195193 connect (copyTxHexAction, &QAction::triggered, this , &TransactionView::copyTxHex);
196194 connect (copyTxPlainText, &QAction::triggered, this , &TransactionView::copyTxPlainText);
197- connect (editLabelAction, &QAction::triggered, this , &TransactionView::editLabel);
198195 connect (showDetailsAction, &QAction::triggered, this , &TransactionView::showDetails);
199196 // Double-clicking on a transaction on the transaction history page shows details
200197 connect (this , &TransactionView::doubleClicked, this , &TransactionView::showDetails);
@@ -474,52 +471,6 @@ void TransactionView::copyTxPlainText()
474471 GUIUtil::copyEntryData (transactionView, 0 , TransactionTableModel::TxPlainTextRole);
475472}
476473
477- void TransactionView::editLabel ()
478- {
479- if (!transactionView->selectionModel () ||!model)
480- return ;
481- QModelIndexList selection = transactionView->selectionModel ()->selectedRows ();
482- if (!selection.isEmpty ())
483- {
484- AddressTableModel *addressBook = model->getAddressTableModel ();
485- if (!addressBook)
486- return ;
487- QString address = selection.at (0 ).data (TransactionTableModel::AddressRole).toString ();
488- if (address.isEmpty ())
489- {
490- // If this transaction has no associated address, exit
491- return ;
492- }
493- // Is address in address book? Address book can miss address when a transaction is
494- // sent from outside the UI.
495- int idx = addressBook->lookupAddress (address);
496- if (idx != -1 )
497- {
498- // Edit sending / receiving address
499- QModelIndex modelIdx = addressBook->index (idx, 0 , QModelIndex ());
500- // Determine type of address, launch appropriate editor dialog type
501- QString type = modelIdx.data (AddressTableModel::TypeRole).toString ();
502-
503- EditAddressDialog dlg (
504- type == AddressTableModel::Receive
505- ? EditAddressDialog::EditReceivingAddress
506- : EditAddressDialog::EditSendingAddress, this );
507- dlg.setModel (addressBook);
508- dlg.loadRow (idx);
509- dlg.exec ();
510- }
511- else
512- {
513- // Add sending address
514- EditAddressDialog dlg (EditAddressDialog::NewSendingAddress,
515- this );
516- dlg.setModel (addressBook);
517- dlg.setAddress (address);
518- dlg.exec ();
519- }
520- }
521- }
522-
523474void TransactionView::showDetails ()
524475{
525476 if (!transactionView->selectionModel ())
0 commit comments