mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-25 09:08:38 -07:00
FIX: Remove redundant calls to set_selected_machine when disconnecting LAN
jira: [STUDIO-13828] Change-Id: Icb2cca28cddec1e4e6b6b14b6893777db1f1a3a8 (cherry picked from commit 477fd8d3cf3adad8daaa00d95244225d9ac800b3)
This commit is contained in:
parent
e68daa36c9
commit
fcd0a11490
2 changed files with 2 additions and 7 deletions
|
|
@ -171,7 +171,7 @@ void ConnectPrinterDialog::on_input_enter(wxCommandEvent& evt)
|
|||
}
|
||||
|
||||
|
||||
void ConnectPrinterDialog::on_button_confirm(wxCommandEvent &event)
|
||||
void ConnectPrinterDialog::on_button_confirm(wxCommandEvent &event)
|
||||
{
|
||||
wxString code = m_textCtrl_code->GetTextCtrl()->GetValue();
|
||||
for (char c : code) {
|
||||
|
|
@ -182,9 +182,6 @@ void ConnectPrinterDialog::on_button_confirm(wxCommandEvent &event)
|
|||
}
|
||||
if (m_obj) {
|
||||
m_obj->set_user_access_code(code.ToStdString());
|
||||
if (m_need_connect) {
|
||||
wxGetApp().getDeviceManager()->set_selected_machine(m_obj->get_dev_id());
|
||||
}
|
||||
}
|
||||
EndModal(wxID_OK);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ class ConnectPrinterDialog : public DPIDialog
|
|||
{
|
||||
private:
|
||||
protected:
|
||||
bool m_need_connect{true};
|
||||
wxStaticText * m_staticText_connection_code;
|
||||
TextInput * m_textCtrl_code;
|
||||
Button * m_button_confirm;
|
||||
|
|
@ -46,12 +45,11 @@ public:
|
|||
|
||||
~ConnectPrinterDialog();
|
||||
|
||||
void go_connect_printer(bool need) {m_need_connect = need;};
|
||||
void end_modal(wxStandardID id);
|
||||
void init_bitmap();
|
||||
void set_machine_object(MachineObject* obj);
|
||||
void on_input_enter(wxCommandEvent& evt);
|
||||
void on_button_confirm(wxCommandEvent &event);
|
||||
void on_button_confirm(wxCommandEvent &event);
|
||||
void on_dpi_changed(const wxRect &suggested_rect) override;
|
||||
};
|
||||
}} // namespace Slic3r::GUI
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue