mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
Further improvement error reporting with buggy custom G-code sections #1516
1) The macro-processor sanitizes the source code line for invalid UTF-8 characters. Ideally these invalid characters would be replaced with ?, they are just dropped as of now. Better than showing an empty string when converting to wxString though. 2) G-code export collects full error message for 1st occurence of an error for each custom G-code block. 3) The composite error message now displays the errors collected in 2). 4) The error window is now scaled bigger and the Slicer logo is smaller if the text is to be rendered with monospaced font, as the monospaced text will not be word wrapped.
This commit is contained in:
parent
b251fea5fe
commit
3dd9b8c718
7 changed files with 31 additions and 15 deletions
|
@ -3643,17 +3643,17 @@ void Plater::priv::on_process_completed(SlicingProcessCompletedEvent &evt)
|
|||
// This bool stops showing export finished notification even when process_completed_with_error is false
|
||||
bool has_error = false;
|
||||
if (evt.error()) {
|
||||
std::string message = evt.format_error_message();
|
||||
std::pair<std::string, bool> message = evt.format_error_message();
|
||||
if (evt.critical_error()) {
|
||||
if (q->m_tracking_popup_menu)
|
||||
// We don't want to pop-up a message box when tracking a pop-up menu.
|
||||
// We postpone the error message instead.
|
||||
q->m_tracking_popup_menu_error_message = message;
|
||||
q->m_tracking_popup_menu_error_message = message.first;
|
||||
else
|
||||
show_error(q, message);
|
||||
show_error(q, message.first, message.second);
|
||||
} else
|
||||
notification_manager->push_slicing_error_notification(message, *q->get_current_canvas3D());
|
||||
this->statusbar()->set_status_text(from_u8(message));
|
||||
notification_manager->push_slicing_error_notification(message.first, *q->get_current_canvas3D());
|
||||
this->statusbar()->set_status_text(from_u8(message.first));
|
||||
if (evt.invalidate_plater())
|
||||
{
|
||||
const wxString invalid_str = _L("Invalid data");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue