diff options
| author | Salanto <62221668+Salanto@users.noreply.github.com> | 2024-07-21 18:54:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-21 18:54:52 +0200 |
| commit | e82726ba5b4a2faf8caea747789d71f1e717f7f8 (patch) | |
| tree | 540c4eb207a28d26fe91b3cfed92bb6d02240a66 /src/widgets | |
| parent | 0c3a4259ab22ff2e44e4eca6a11e8054f3c78d30 (diff) | |
Attorney Online 2.11 Release Candidate 1 (#1026)
* Version bump and minor fixes
* Remove unecessary headers
Thanks QtCreator
Diffstat (limited to 'src/widgets')
| -rw-r--r-- | src/widgets/playerlistwidget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/playerlistwidget.cpp b/src/widgets/playerlistwidget.cpp index 849c62a9..2a3a8987 100644 --- a/src/widgets/playerlistwidget.cpp +++ b/src/widgets/playerlistwidget.cpp @@ -97,7 +97,7 @@ void PlayerListWidget::onCustomContextMenuRequested(const QPoint &pos) } }); - if (!m_is_authenticated) + if (m_is_authenticated) { QAction *kick_player_action = menu->addAction("Kick"); connect(kick_player_action, &QAction::triggered, this, [this, id, name] { @@ -137,9 +137,9 @@ void PlayerListWidget::removePlayer(int playerId) void PlayerListWidget::filterPlayerList() { int area_id = m_player_map.value(ao_app->client_id).area_id; - for (int i = 0; i < count(); ++i) + for (QListWidgetItem *item : qAsConst(m_item_map)) { - m_item_map[i]->setHidden(m_player_map[i].area_id != area_id); + item->setHidden(m_player_map[item->data(Qt::UserRole).toInt()].area_id != area_id); } } |
