mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-21 14:02:05 +08:00
Qt-UI fix escaping all wifi access points (#20147)
* fix wifi escaping * less code Co-authored-by: Comma Device <device@comma.ai>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <QLineEdit>
|
||||
#include <QRandomGenerator>
|
||||
#include <QtConcurrent>
|
||||
#include <algorithm>
|
||||
|
||||
#include "common/params.h"
|
||||
#include "networking.hpp"
|
||||
@@ -325,6 +326,8 @@ void WifiUI::refresh() {
|
||||
|
||||
int i = 0;
|
||||
int countWidgets = 0;
|
||||
int pageCount = (wifi->seen_networks.size() - 1) / networks_per_page;
|
||||
page = std::max(0, std::min(page, pageCount));
|
||||
for (Network &network : wifi->seen_networks) {
|
||||
QHBoxLayout *hlayout = new QHBoxLayout;
|
||||
if (page * networks_per_page <= i && i < (page + 1) * networks_per_page) {
|
||||
|
||||
Reference in New Issue
Block a user