Treat nozzle diameter mismatch as a warning (#14890)

This commit is contained in:
Ian Bassi
2026-07-22 19:09:57 -03:00
committed by GitHub
parent f23ad64303
commit a7c0ab52f0
4 changed files with 100 additions and 5 deletions
+11 -2
View File
@@ -26,6 +26,9 @@ struct prePrintInfo
wxString wiki_url;
wxString link_label; // optional: clickable text appended after msg
std::function<void()> link_callback; // optional: internal action for link_label click
wxString checkbox_label; // optional: an acknowledgement checkbox under msg
bool checkbox_checked{false};
std::function<void(bool)> checkbox_callback; // called with the new state on toggle
int index{0};
public:
@@ -33,8 +36,9 @@ public:
return level == other.level && type == other.type &&
msg == other.msg && tips == other.tips &&
wiki_url == other.wiki_url && link_label == other.link_label &&
checkbox_label == other.checkbox_label && checkbox_checked == other.checkbox_checked &&
index == other.index;
// link_callback excluded: std::function is not comparable
// link_callback / checkbox_callback excluded: std::function is not comparable
}
};
@@ -59,7 +63,6 @@ enum PrintDialogStatus : unsigned int {
PrintStatusInPrinting,
PrintStatusNozzleMatchInvalid,
PrintStatusNozzleDataInvalid,
PrintStatusNozzleDiameterMismatch,
PrintStatusNozzleTypeMismatch,
PrintStatusNozzleNoMatchedHotends,
PrintStatusNozzleRackMaximumInstalled,
@@ -106,6 +109,9 @@ enum PrintDialogStatus : unsigned int {
PrintStatusFilaSwitcherSlicingNotMatch,
PrintStatusRackNozzleNumUnmeetWarning,
PrintStatusHasUnreliableNozzleWarning,
// Orca: a nozzle diameter that differs from the one the printer remembers is a warning,
// not an error, so non-standard nozzles can still be printed with.
PrintStatusNozzleDiameterMismatch,
PrintStatusPrinterWarningEnd,
// Warnings for filament
@@ -159,6 +165,9 @@ public:
void add(PrintDialogStatus state, wxString msg, wxString tip, const wxString& wiki_url);
// Orca: minimal callback-link render path instead of the full style-bitmask machinery.
void add_with_link(PrintDialogStatus state, wxString msg, wxString link_label, std::function<void()> link_callback);
// Orca: render msg with an acknowledgement checkbox beneath it, for an overridable warning that
// the user must tick before proceeding (checkbox_callback reports the new state).
void add_with_checkbox(PrintDialogStatus state, wxString msg, wxString checkbox_label, bool checked, std::function<void(bool)> checkbox_callback);
static ::std::string get_print_status_info(PrintDialogStatus status);
wxString get_pre_state_msg(PrintDialogStatus status);