mirror of
https://github.com/feather-wallet/feather.git
synced 2024-11-16 17:27:38 +00:00
AccountSwitcher: fix sort
This commit is contained in:
parent
f3ad96f812
commit
a972281c7a
1 changed files with 11 additions and 5 deletions
|
@ -54,22 +54,28 @@ AccountSwitcherDialog::AccountSwitcherDialog(QSharedPointer<AppContext> ctx, QWi
|
|||
}
|
||||
|
||||
void AccountSwitcherDialog::switchAccount() {
|
||||
QModelIndex index = ui->accounts->currentIndex();
|
||||
m_ctx->wallet->switchSubaddressAccount(index.row());
|
||||
auto row = this->currentEntry();
|
||||
if (!row) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_ctx->wallet->switchSubaddressAccount(row->getRowId());
|
||||
}
|
||||
|
||||
void AccountSwitcherDialog::copyLabel() {
|
||||
auto row = this->currentEntry();
|
||||
if (!row)
|
||||
if (!row) {
|
||||
return;
|
||||
}
|
||||
|
||||
Utils::copyToClipboard(QString::fromStdString(row->getLabel()));
|
||||
}
|
||||
|
||||
void AccountSwitcherDialog::copyBalance() {
|
||||
auto row = this->currentEntry();
|
||||
if (!row)
|
||||
if (!row) {
|
||||
return;
|
||||
}
|
||||
|
||||
Utils::copyToClipboard(QString::fromStdString(row->getBalance()));
|
||||
}
|
||||
|
@ -101,7 +107,7 @@ void AccountSwitcherDialog::showContextMenu(const QPoint &point) {
|
|||
}
|
||||
|
||||
Monero::SubaddressAccountRow* AccountSwitcherDialog::currentEntry() {
|
||||
QModelIndex index = ui->accounts->currentIndex();
|
||||
QModelIndex index = m_proxyModel->mapToSource(ui->accounts->currentIndex());
|
||||
return m_ctx->wallet->subaddressAccountModel()->entryFromIndex(index);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue