mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
ENH: clean codes about device
JIRA: [STUDIO-13609] Change-Id: I591de7033360b9570600006cfbce2148a8d031d5 (cherry picked from commit e9c774be8f4c89b8dafa14ef56913612fb68bd0c)
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
#include <slic3r/GUI/Widgets/Label.hpp>
|
||||
#include "libslic3r/AppConfig.hpp"
|
||||
|
||||
#include "DeviceCore/DevManager.h"
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
ConnectPrinterDialog::ConnectPrinterDialog(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos, const wxSize &size, long style)
|
||||
: DPIDialog(parent, id, _L("Connect Printer (LAN)"), pos, size, style)
|
||||
@@ -118,7 +120,7 @@ void ConnectPrinterDialog::init_bitmap()
|
||||
std::string language = config->get("language");
|
||||
|
||||
if (m_obj) {
|
||||
std::string img_str = DeviceManager::get_printer_diagram_img(m_obj->printer_type);
|
||||
std::string img_str = DevPrinterConfigUtil::get_printer_connect_help_img(m_obj->printer_type);
|
||||
if(img_str.empty()){img_str = "input_access_code_x1"; }
|
||||
|
||||
if (language == "zh_CN") {
|
||||
@@ -181,7 +183,7 @@ 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->dev_id);
|
||||
wxGetApp().getDeviceManager()->set_selected_machine(m_obj->get_dev_id());
|
||||
}
|
||||
}
|
||||
EndModal(wxID_OK);
|
||||
|
||||
Reference in New Issue
Block a user