mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-01 09:32:50 +00:00
Fixed configuration & validate C++ ports.
This commit is contained in:
@@ -320,6 +320,14 @@ void ConfigBase::setenv_()
|
||||
}
|
||||
|
||||
void ConfigBase::load(const std::string &file)
|
||||
{
|
||||
if (boost::iends_with(file, ".gcode") || boost::iends_with(file, ".g"))
|
||||
this->load_from_gcode(file);
|
||||
else
|
||||
this->load_from_ini(file);
|
||||
}
|
||||
|
||||
void ConfigBase::load_from_ini(const std::string &file)
|
||||
{
|
||||
namespace pt = boost::property_tree;
|
||||
pt::ptree tree;
|
||||
|
||||
@@ -952,6 +952,7 @@ public:
|
||||
double get_abs_value(const t_config_option_key &opt_key, double ratio_over) const;
|
||||
void setenv_();
|
||||
void load(const std::string &file);
|
||||
void load_from_ini(const std::string &file);
|
||||
void load_from_gcode(const std::string &file);
|
||||
void save(const std::string &file) const;
|
||||
|
||||
|
||||
@@ -1825,7 +1825,7 @@ std::string FullPrintConfig::validate()
|
||||
|
||||
// --nozzle-diameter
|
||||
for (double nd : this->nozzle_diameter.values)
|
||||
if (nd < 1)
|
||||
if (nd < 0.005)
|
||||
return "Invalid value for --nozzle-diameter";
|
||||
|
||||
// --perimeters
|
||||
|
||||
Reference in New Issue
Block a user