ENH:check 3mf files without gcode data

Change-Id: Ic056cd29d4bab8612701fd2291af5a14eb937bb7
This commit is contained in:
tao wang authored and Lane.Wei committed 2023-07-07 17:29:08 +08:00
1 parent 304c3abfe9
commit b79ee23dd6
6 files changed
+21 -11

No files matched your search

+10 -2
View File
@@ -507,8 +507,16 @@ void MediaFilePanel::doAction(size_t index, int action)
return;
}
auto &file = fs->GetFile(index);
Slic3r::GUI::wxGetApp().plater()->update_print_required_data(config, model, plate_data_list, from_u8(file.name).ToStdString());
wxPostEvent(Slic3r::GUI::wxGetApp().plater(), SimpleEvent(EVT_PRINT_FROM_SDCARD_VIEW));
int gcode_file_count = Slic3r::GUI::wxGetApp().plater()->update_print_required_data(config, model, plate_data_list, from_u8(file.name).ToStdString());
if (gcode_file_count > 0) {
wxPostEvent(Slic3r::GUI::wxGetApp().plater(), SimpleEvent(EVT_PRINT_FROM_SDCARD_VIEW));
}
else {
MessageDialog dlg(this, _L("The .gcode.3mf file contains no G-code data.Please slice it whthBambu Studio and export a new .gcode.3mf file."), wxEmptyString, wxICON_WARNING | wxOK);
auto res = dlg.ShowModal();
}
});
return;
}