mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-28 19:31:22 +00:00
Remove printer connect/disconnect for now
This commit is contained in:
@@ -389,22 +389,6 @@ std::vector<NativeCommand> build_command_catalog()
|
|||||||
});
|
});
|
||||||
|
|
||||||
// ---- Printer / device connection ----
|
// ---- Printer / device connection ----
|
||||||
add("connect_printer", _u8L("Connect Printer"), _u8L("Printer"), [](const std::string&) {
|
|
||||||
if (Plater* plater = wxGetApp().plater())
|
|
||||||
plater->connect_to_printer();
|
|
||||||
return AppActionRunResult{AppActionRunResult::Level::Success};
|
|
||||||
});
|
|
||||||
add("disconnect_printer", _u8L("Disconnect Printer"), _u8L("Printer"), [](const std::string&) {
|
|
||||||
DeviceManager* dev = wxGetApp().getDeviceManager();
|
|
||||||
if (!dev)
|
|
||||||
return AppActionRunResult{AppActionRunResult::Level::Info, _L("Printer connection is unavailable.")};
|
|
||||||
if (MachineObject* machine = dev->get_selected_machine()) {
|
|
||||||
machine->disconnect();
|
|
||||||
dev->set_selected_machine("");
|
|
||||||
return AppActionRunResult{AppActionRunResult::Level::Success};
|
|
||||||
}
|
|
||||||
return AppActionRunResult{AppActionRunResult::Level::Info, _L("Printer is not connected.")};
|
|
||||||
});
|
|
||||||
add("sync_ams", _u8L("Synchronize Filament List from AMS"), _u8L("Printer"), [](const std::string&) {
|
add("sync_ams", _u8L("Synchronize Filament List from AMS"), _u8L("Printer"), [](const std::string&) {
|
||||||
Plater* plater = wxGetApp().plater();
|
Plater* plater = wxGetApp().plater();
|
||||||
DeviceManager* dev = wxGetApp().getDeviceManager();
|
DeviceManager* dev = wxGetApp().getDeviceManager();
|
||||||
|
|||||||
@@ -7138,7 +7138,6 @@ struct Plater::priv
|
|||||||
void on_action_publish(wxCommandEvent &evt);
|
void on_action_publish(wxCommandEvent &evt);
|
||||||
void on_action_print_plate(SimpleEvent&);
|
void on_action_print_plate(SimpleEvent&);
|
||||||
void open_machine_select_dialog(int plate_idx, PrintFromType print_type = PrintFromType::FROM_NORMAL);
|
void open_machine_select_dialog(int plate_idx, PrintFromType print_type = PrintFromType::FROM_NORMAL);
|
||||||
void connect_to_printer();
|
|
||||||
void on_action_print_all(SimpleEvent&);
|
void on_action_print_all(SimpleEvent&);
|
||||||
void on_action_export_gcode(SimpleEvent&);
|
void on_action_export_gcode(SimpleEvent&);
|
||||||
void on_action_send_gcode(SimpleEvent&);
|
void on_action_send_gcode(SimpleEvent&);
|
||||||
@@ -12729,22 +12728,6 @@ void Plater::priv::open_machine_select_dialog(int plate_idx, PrintFromType print
|
|||||||
m_select_machine_dlg->ShowModal();
|
m_select_machine_dlg->ShowModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Plater::priv::connect_to_printer()
|
|
||||||
{
|
|
||||||
// BBL network (vendor BBL, not print-host) and printer-agents mode surface the real
|
|
||||||
// machine picker (lists discovered printers, connects on selection). Everything else
|
|
||||||
// is a print-host printer: the Connection button's dialog (host/API-key config).
|
|
||||||
PresetBundle* pb = wxGetApp().preset_bundle;
|
|
||||||
const bool bbl_or_agent = (pb && pb->use_bbl_network()) ||
|
|
||||||
wxGetApp().app_config->get_bool("use_printer_agents");
|
|
||||||
if (bbl_or_agent)
|
|
||||||
open_machine_select_dialog(q->get_partplate_list().get_curr_plate_index());
|
|
||||||
else {
|
|
||||||
PhysicalPrinterDialog dlg(q->GetParent());
|
|
||||||
dlg.ShowModal();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Plater::priv::on_action_send_to_multi_machine(SimpleEvent&)
|
void Plater::priv::on_action_send_to_multi_machine(SimpleEvent&)
|
||||||
{
|
{
|
||||||
if (!m_send_multi_dlg)
|
if (!m_send_multi_dlg)
|
||||||
@@ -17528,8 +17511,6 @@ Sidebar::DockingState Plater::get_sidebar_docking_state() const { return p->get_
|
|||||||
|
|
||||||
void Plater::reset_window_layout() { p->reset_window_layout(); }
|
void Plater::reset_window_layout() { p->reset_window_layout(); }
|
||||||
|
|
||||||
void Plater::connect_to_printer() { p->connect_to_printer(); }
|
|
||||||
|
|
||||||
//BBS
|
//BBS
|
||||||
void Plater::select_curr_plate_all() { p->select_curr_plate_all(); }
|
void Plater::select_curr_plate_all() { p->select_curr_plate_all(); }
|
||||||
void Plater::remove_curr_plate_all() { p->remove_curr_plate_all(); }
|
void Plater::remove_curr_plate_all() { p->remove_curr_plate_all(); }
|
||||||
|
|||||||
@@ -354,9 +354,6 @@ public:
|
|||||||
void add_file();
|
void add_file();
|
||||||
// Returns false when no object was added (e.g. the user cancelled the load dialog).
|
// Returns false when no object was added (e.g. the user cancelled the load dialog).
|
||||||
bool add_model(bool imperial_units = false, std::string fname = "");
|
bool add_model(bool imperial_units = false, std::string fname = "");
|
||||||
// Opens the connection/management dialog appropriate for the current printer's
|
|
||||||
// technology: the machine picker for BBL/printer-agents, the print-host dialog otherwise.
|
|
||||||
void connect_to_printer();
|
|
||||||
void import_zip_archive();
|
void import_zip_archive();
|
||||||
void import_sl1_archive();
|
void import_sl1_archive();
|
||||||
void extract_config_from_project();
|
void extract_config_from_project();
|
||||||
|
|||||||
Reference in New Issue
Block a user