mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-03-04 17:44:46 -07:00
FIX: the printer name not display
jira: [STUDIO-12821] Change-Id: I8e99f3c09446fcdc542b61479bbcbd38fb77aaf2 (cherry picked from commit bd1d5dcce03b4de1229926f54816a6bcf953a2f2)
This commit is contained in:
parent
88eae5d217
commit
dcf3505bb4
3 changed files with 2 additions and 20 deletions
|
|
@ -440,23 +440,6 @@ bool MonitorPanel::Show(bool show)
|
|||
return wxPanel::Show(show);
|
||||
}
|
||||
|
||||
void MonitorPanel::update_side_panel()
|
||||
{
|
||||
Slic3r::DeviceManager *dev = Slic3r::GUI::wxGetApp().getDeviceManager();
|
||||
if (!dev) return;
|
||||
|
||||
auto is_next_machine = false;
|
||||
if (!dev->get_first_online_user_machine().empty()) {
|
||||
wxCommandEvent* event = new wxCommandEvent(wxEVT_COMMAND_CHOICE_SELECTED);
|
||||
event->SetString(dev->get_first_online_user_machine());
|
||||
wxQueueEvent(this, event);
|
||||
is_next_machine = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!is_next_machine) { m_side_tools->set_none_printer_mode(); }
|
||||
}
|
||||
|
||||
void MonitorPanel::show_status(int status)
|
||||
{
|
||||
if (!m_initialized) return;
|
||||
|
|
|
|||
|
|
@ -144,7 +144,6 @@ public:
|
|||
void update_hms_tag();
|
||||
bool Show(bool show);
|
||||
|
||||
void update_side_panel();
|
||||
void show_status(int status);
|
||||
|
||||
std::string get_string_from_tab(PrinterTab tab);
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ void SideToolsPanel::on_timer(wxTimerEvent &event)
|
|||
|
||||
void SideToolsPanel::set_current_printer_name(std::string dev_name)
|
||||
{
|
||||
if (m_dev_name == from_u8(dev_name)) return;
|
||||
if (m_dev_name == from_u8(dev_name) && !m_none_printer) return;
|
||||
|
||||
m_none_printer = false;
|
||||
m_dev_name = from_u8(dev_name);
|
||||
|
|
@ -66,7 +66,7 @@ void SideToolsPanel::set_current_printer_name(std::string dev_name)
|
|||
|
||||
void SideToolsPanel::set_current_printer_signal(WifiSignal sign)
|
||||
{
|
||||
if (last_printer_signal == sign) return;
|
||||
if (last_printer_signal == sign && !m_none_printer) return;
|
||||
|
||||
last_printer_signal = sign;
|
||||
m_none_printer = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue