Merge of pull request Add support for RepetierServer by @docbobo

with the following refactorings:

1) Removed the "printhost_slug" config from the Printer config
   and from all the Printer config related spots.
2) "printhost_slug" renamed to "printhost_port". Slug sounds nasty.
3) Improved error reporting of RepetierHost class.
4) Refactored for the new "Physical Printers"

Following refactorings were done independently of the Repetier pull request:
1) Removed PrintHost static print config.
2) Clean-up after conversion of print host configuration
   from Printer config to Physical Printer config.
3) Fixed some issues, where the Printer config was still queried for
   host configuration. Vojtech believes that this should not happen
   after the host configuration is converted to physical printers.

Vojtech still feels that more refactoring is needed in regard to porting
the host configuration from Printer profile to the new Physical Printer
profile.
This commit is contained in:
Vojtech Bubnik 2020-10-28 09:51:05 +01:00
parent 0798fa8185
commit 7c571c1d9d
24 changed files with 556 additions and 200 deletions
src/slic3r/GUI

View file

@ -750,14 +750,11 @@ bool MainFrame::can_export_gcode() const
bool MainFrame::can_send_gcode() const
{
if (m_plater == nullptr)
return false;
if (m_plater->model().objects.empty())
return false;
const auto print_host_opt = wxGetApp().preset_bundle->printers.get_edited_preset().config.option<ConfigOptionString>("print_host");
return print_host_opt != nullptr && !print_host_opt->value.empty();
if (m_plater && ! m_plater->model().objects.empty())
if (const DynamicPrintConfig *cfg = wxGetApp().preset_bundle->physical_printers.get_selected_printer_config(); cfg)
if (const auto *print_host_opt = cfg->option<ConfigOptionString>("print_host"); print_host_opt)
return ! print_host_opt->value.empty();
return false;
}
bool MainFrame::can_export_gcode_sd() const