ENH:check 3mf files without gcode data

Change-Id: Ic056cd29d4bab8612701fd2291af5a14eb937bb7
This commit is contained in:
tao wang 2023-06-09 14:07:55 +08:00 committed by Lane.Wei
parent 304c3abfe9
commit b79ee23dd6
6 changed files with 21 additions and 11 deletions

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;
}