fix an issue that print_host value was not retrieved.

This commit is contained in:
SoftFever 2022-08-22 16:56:31 +08:00
parent ef1e0590c6
commit 52f68227a4

View file

@ -1115,7 +1115,7 @@ bool MainFrame::can_send_gcode() const
{
if (m_plater && !m_plater->model().objects.empty())
{
auto cfg = wxGetApp().preset_bundle->printers.get_selected_preset().config;
auto cfg = wxGetApp().preset_bundle->printers.get_edited_preset().config;
if (const auto *print_host_opt = cfg.option<ConfigOptionString>("print_host"); print_host_opt)
return !print_host_opt->value.empty();
}