From 1a8c2fc251774d776ef00f9ec6fc3e2e317166e4 Mon Sep 17 00:00:00 2001 From: zhangjiaping Date: Mon, 10 May 2021 10:03:42 +0800 Subject: [PATCH] Fix: Refresh wifi failed when it is in lan list. --- src/mainwindow.cpp | 5 +++-- src/mainwindow.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 0cab3e11..ba188603 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1735,10 +1735,10 @@ void MainWindow::getWifiListDone(QStringList slist) current_wifi_list_state = LOAD_WIFI_LIST; } - if (this->is_btnLanList_clicked == 1) { + if (this->is_btnLanList_clicked == 1 && current_wifi_list_state != REFRESH_WIFI) { return; } - if (current_wifi_list_state == LOAD_WIFI_LIST) { + if (current_wifi_list_state == LOAD_WIFI_LIST || current_wifi_list_state == REFRESH_WIFI) { //qDebug() << "loadwifi的列表"; loadWifiListDone(slist); is_init_wifi_list = 0; @@ -4048,6 +4048,7 @@ int MainWindow::getScreenGeometry(QString methodName) void MainWindow::requestRefreshWifiList() { + current_wifi_list_state = REFRESH_WIFI; this->ksnm->execGetWifiList(this->wcardname); } diff --git a/src/mainwindow.h b/src/mainwindow.h index b903cb93..9b557a49 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -112,6 +112,7 @@ #define LOAD_WIFI_LIST 0 #define UPDATE_WIFI_LIST 1 #define RECONNECT_WIFI 2 +#define REFRESH_WIFI 3 class OneConnForm; class ConfForm;