Skip to content

Commit

Permalink
New feature: Hover over ECO code in game list
Browse files Browse the repository at this point in the history
  • Loading branch information
Isarhamster committed Nov 15, 2024
1 parent 1e62891 commit 6b8dd77
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/database/filtermodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "filtermodel.h"

#include "database.h"
#include "ecopositions.h"
#include "filter.h"
#include "qt6compat.h"
#include "settings.h"
Expand Down Expand Up @@ -241,6 +242,14 @@ QVariant FilterModel::data(const QModelIndex &index, int role) const
QVariant v = qApp->palette().color(QPalette::Text);
return v;
}
else if (role == Qt::ToolTipRole)
{
if(index.column() == 10) // ECO
{
QString eco = m_filter->database()->tagValue(i, m_columnTagIndex[index.column()]);
return EcoPositions::findEcoNameDetailed(eco);
}
}
}
}
return QVariant();
Expand Down

0 comments on commit 6b8dd77

Please sign in to comment.