AccountSwitcher: fix sort [2]

This commit is contained in:
tobtoht 2023-01-17 21:41:02 +01:00
parent a972281c7a
commit 93bfb93fb3
No known key found for this signature in database
GPG key ID: E45B10DD027D2472

View file

@ -76,6 +76,9 @@ QVariant SubaddressAccountModel::parseSubaddressAccountRow(const Monero::Subaddr
{
switch (index.column()) {
case Number:
if (role == Qt::UserRole) {
return index.row();
}
return QString("#%1").arg(QString::number(index.row()));
case Address:
return QString::fromStdString(row.getAddress());
@ -152,4 +155,5 @@ Monero::SubaddressAccountRow* SubaddressAccountModel::entryFromIndex(const QMode
SubaddressAccountProxyModel::SubaddressAccountProxyModel(QObject *parent)
: QSortFilterProxyModel(parent)
{
setSortRole(Qt::UserRole);
}