mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-26 12:22:32 +00:00
FIX: update the time shown; keep the val update while popup
jira: [STUDIO-9268] Change-Id: I0b743ddb0ae479f9baad6239f68861a199681cda (cherry picked from commit e1bc737d1cbc1dcf79ceecf9ed301a4a02590d5a)
This commit is contained in:
@@ -211,7 +211,7 @@ void uiAmsPercentHumidityDryPopup::DrawGridArea(wxDC &dc, wxPoint start_p)
|
||||
}
|
||||
else if (header == _L("Left Time"))
|
||||
{
|
||||
const wxString &time_str = wxString::Format(_L("%d Hours"), m_left_dry_time);
|
||||
const wxString &time_str = wxString::Format(_L("%d : %d"), m_left_dry_time / 60, m_left_dry_time % 60);
|
||||
dc.DrawText(time_str, left, start_p.y + row_height);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace Slic3r { namespace GUI {
|
||||
|
||||
struct uiAmsHumidityInfo
|
||||
{
|
||||
std::string ams_id;
|
||||
int humidity_level = -1;
|
||||
int humidity_percent = -1;
|
||||
float current_temperature;
|
||||
@@ -35,7 +36,9 @@ public:
|
||||
~uiAmsPercentHumidityDryPopup() = default;
|
||||
|
||||
public:
|
||||
void Update(uiAmsHumidityInfo *info) { Update(info->humidity_level, info->humidity_percent, info->left_dry_time, info->current_temperature); };
|
||||
void Update(uiAmsHumidityInfo *info) { m_ams_id = info->ams_id; Update(info->humidity_level, info->humidity_percent, info->left_dry_time, info->current_temperature); };
|
||||
|
||||
std::string get_owner_ams_id() const { return m_ams_id; }
|
||||
|
||||
virtual void OnDismiss() wxOVERRIDE {};
|
||||
virtual bool ProcessLeftDown(wxMouseEvent &event) wxOVERRIDE { return true;};
|
||||
@@ -52,6 +55,9 @@ private:
|
||||
void DrawGridArea(wxDC &dc, wxPoint start_p);
|
||||
|
||||
private:
|
||||
/*owner ams id*/
|
||||
std::string m_ams_id;
|
||||
|
||||
int m_humidity_level = 0;
|
||||
int m_humidity_percent = 0;
|
||||
int m_left_dry_time = 0;
|
||||
|
||||
Reference in New Issue
Block a user