mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Allow printing even if nozzle info isn't reported by firmware. (#12814)
* Don't assume 0.4mm nozzle; format as "unknown" if not defined. * Skip nozzle diameter and hardness checks if nozzle info unknown. --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "GUI.hpp"
|
||||
#include "GUI_Utils.hpp"
|
||||
#include "GUI_App.hpp"
|
||||
#include "I18N.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
@@ -32,6 +33,15 @@ wxDEFINE_EVENT(EVT_VOLUME_ATTACHED, VolumeAttachedEvent);
|
||||
wxDEFINE_EVENT(EVT_VOLUME_DETACHED, VolumeDetachedEvent);
|
||||
#endif // _WIN32
|
||||
|
||||
wxString format_nozzle_diameter(float diameter)
|
||||
{
|
||||
if (diameter <= 0.0f) {
|
||||
return _L("Unknown");
|
||||
}
|
||||
|
||||
return wxString::Format("%smm", wxString::FromDouble(diameter));
|
||||
}
|
||||
|
||||
CopyFileResult copy_file_gui(const std::string &from, const std::string &to, std::string& error_message, const bool with_check)
|
||||
{
|
||||
#ifdef WIN32
|
||||
|
||||
Reference in New Issue
Block a user