mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-08 03:21:11 +00:00
Fix: show all print validation warnings instead of only the last (#14112)
This commit is contained in:
@@ -6058,9 +6058,9 @@ int CLI::run(int argc, char **argv)
|
||||
}
|
||||
(dynamic_cast<Print*>(print))->is_BBL_printer() = is_bbl_vendor_preset;
|
||||
|
||||
StringObjectException warning;
|
||||
std::vector<StringObjectException> warnings;
|
||||
print_fff->set_check_multi_filaments_compatibility(!allow_mix_temp);
|
||||
auto err = print->validate(&warning);
|
||||
auto err = print->validate(&warnings);
|
||||
if (!err.string.empty()) {
|
||||
if ((STRING_EXCEPT_LAYER_HEIGHT_EXCEEDS_LIMIT == err.type) && no_check) {
|
||||
BOOST_LOG_TRIVIAL(warning) << "got warnings: "<< err.string << std::endl;
|
||||
@@ -6094,8 +6094,9 @@ int CLI::run(int argc, char **argv)
|
||||
flush_and_exit(validate_error);
|
||||
}
|
||||
}
|
||||
else if (!warning.string.empty()) {
|
||||
BOOST_LOG_TRIVIAL(warning) << "got warnings: "<< warning.string << std::endl;
|
||||
else if (!warnings.empty()) {
|
||||
for (const auto& w : warnings)
|
||||
BOOST_LOG_TRIVIAL(warning) << "got warnings: "<< w.string << std::endl;
|
||||
}
|
||||
|
||||
if (print->empty()) {
|
||||
@@ -6115,8 +6116,14 @@ int CLI::run(int argc, char **argv)
|
||||
BOOST_LOG_TRIVIAL(info) << "set print's callback to cli_status_callback.";
|
||||
print->set_status_callback(cli_status_callback);
|
||||
g_cli_callback_mgr.set_plate_info(index+1, (plate_to_slice== 0)?partplate_list.get_plate_count():1);
|
||||
if (!warning.string.empty()) {
|
||||
PrintBase::SlicingStatus slicing_status{4, warning.string, 0, 0};
|
||||
if (!warnings.empty()) {
|
||||
std::string warning_text;
|
||||
for (const auto& w : warnings) {
|
||||
if (!warning_text.empty())
|
||||
warning_text += "\n";
|
||||
warning_text += w.string;
|
||||
}
|
||||
PrintBase::SlicingStatus slicing_status{4, warning_text, 0, 0};
|
||||
cli_status_callback(slicing_status);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user