FIX: correct the setter

JIRA: [STUDIO-13571]
Change-Id: I6b5c0ac8c817a8d3b8807e17bce12a44d1101442
(cherry picked from commit 10cf6c6ce478d807c36672c8dace0df5d3cdb629)
This commit is contained in:
xin.zhang
2025-07-22 20:38:13 +08:00
committed by Noisyfox
parent 0e7ed6e163
commit 44c13f3967

View File

@@ -1826,10 +1826,10 @@ AmsHumidityTipPopup::AmsHumidityTipPopup(wxWindow* parent)
void AmsHumidityTipPopup::set_humidity_level(int level)
{
if (0 < current_humidity_level && current_humidity_level < 6)
if (0 < level && level < 6)
{
current_humidity_level = level;
std::string mode_string = wxGetApp().dark_mode()?"_dark":"_light";
std::string mode_string = wxGetApp().dark_mode() ? "_dark" : "_light";
curr_humidity_img->SetBitmap(create_scaled_bitmap("hum_level" + std::to_string(current_humidity_level) + mode_string, this, 132));
curr_humidity_img->Refresh();
curr_humidity_img->Update();