mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 14:05:55 +08:00
Fix import config with bridge flow < 1
supermerill/SuperSlicer/1818
This commit is contained in:
parent
b5ae93d202
commit
ea00699e19
@ -5746,6 +5746,17 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
|
|||||||
}
|
}
|
||||||
if ("first_layer_min_speed" == opt_key && value.back() == '%')
|
if ("first_layer_min_speed" == opt_key && value.back() == '%')
|
||||||
value = value.substr(0, value.length() - 1); //no percent.
|
value = value.substr(0, value.length() - 1); //no percent.
|
||||||
|
if ("bridge_flow_ratio" == opt_key && value.back() != '%') {
|
||||||
|
//need percent
|
||||||
|
try {
|
||||||
|
float val = boost::lexical_cast<float>(value);
|
||||||
|
if (val < 1.)
|
||||||
|
value = boost::lexical_cast<std::string>(val*100) + "%";
|
||||||
|
}
|
||||||
|
catch (boost::bad_lexical_cast&) {
|
||||||
|
value = "100%";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Ignore the following obsolete configuration keys:
|
// Ignore the following obsolete configuration keys:
|
||||||
static std::set<std::string> ignore = {
|
static std::set<std::string> ignore = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user