mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-08 23:34:32 +00:00
Qt: Reload icons and tooltips when game list rows change (#3609)
This commit is contained in:
@@ -1506,7 +1506,7 @@ void GameList::AddPlayedTimeForSerial(const std::string& serial, std::time_t las
|
||||
}
|
||||
|
||||
if (!changed_indices.empty())
|
||||
Host::OnGameListEntriesChanged(std::span<const u32>(changed_indices.begin(), changed_indices.end()));
|
||||
Host::OnGameListEntriesChanged(changed_indices);
|
||||
}
|
||||
|
||||
void GameList::ClearPlayedTimeForSerial(const std::string& serial)
|
||||
|
||||
@@ -476,7 +476,9 @@ void GameListModel::coverLoaded(const std::string& path, const QImage& image, fl
|
||||
|
||||
void GameListModel::rowsChanged(const QList<int>& rows)
|
||||
{
|
||||
const QList<int> roles_changed = {Qt::DisplayRole};
|
||||
QList<int> roles_changed{Qt::DisplayRole, Qt::ToolTipRole};
|
||||
if (m_show_game_icons)
|
||||
roles_changed.append(Qt::DecorationRole);
|
||||
|
||||
// try to collapse multiples
|
||||
size_t start = 0;
|
||||
@@ -1526,8 +1528,8 @@ public:
|
||||
m_animation_timer.stop();
|
||||
}
|
||||
|
||||
emit m_model->dataChanged(m_model->index(m_source_row, GameListModel::Column_Icon),
|
||||
m_model->index(m_source_row, GameListModel::Column_Icon), {Qt::DecorationRole});
|
||||
const QModelIndex mi = m_model->index(m_source_row, GameListModel::Column_Icon);
|
||||
emit m_model->dataChanged(mi, mi, {Qt::DecorationRole});
|
||||
}
|
||||
|
||||
void pauseAnimation()
|
||||
|
||||
Reference in New Issue
Block a user