mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-07 15:51:08 +00:00
refactor: centralize printer compatibility checks
This commit is contained in:
@@ -1277,7 +1277,7 @@ void SendToPrinterDialog::update_show_status()
|
||||
reset_timeout();
|
||||
|
||||
// reading done
|
||||
if (is_blocking_printing(obj_)) {
|
||||
if (wxGetApp().is_blocking_printing(obj_)) {
|
||||
show_status(PrintDialogStatus::PrintStatusUnsupportedPrinter);
|
||||
return;
|
||||
}
|
||||
@@ -1342,16 +1342,6 @@ void SendToPrinterDialog::update_show_status()
|
||||
}
|
||||
}
|
||||
|
||||
bool SendToPrinterDialog::is_blocking_printing(MachineObject* obj_)
|
||||
{
|
||||
DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
|
||||
if (!dev) return true;
|
||||
|
||||
PresetBundle* preset_bundle = wxGetApp().preset_bundle;
|
||||
auto source_model = preset_bundle->printers.get_edited_preset().get_printer_type(preset_bundle);
|
||||
return !DevPrinterConfigUtil::is_printer_model_compatible(source_model, *obj_);
|
||||
}
|
||||
|
||||
void SendToPrinterDialog::Enable_Refresh_Button(bool en)
|
||||
{
|
||||
if (!en) {
|
||||
|
||||
Reference in New Issue
Block a user