Merge remote-tracking branch 'remotes/origin/dev_native' into vb_precompiled_headers

This commit is contained in:
bubnikv 2018-10-29 16:02:56 +01:00
commit c1fb4c0c5e

View File

@ -111,9 +111,9 @@ bool PlaceholderParser::apply_config(const DynamicPrintConfig &rhs)
const ConfigOption *opt_rhs = rhs.option(opt_key);
const ConfigOption *opt_old = m_config.option(opt_key, false);
if (opt_old != nullptr) {
if ((opt_rhs->type() == coFloatOrPercent &&
dynamic_cast<const ConfigOptionFloat*>(opt_old)->value == rhs.get_abs_value(opt_key)) ||
*opt_rhs == *opt_old)
if (opt_rhs->type() == coFloatOrPercent ?
dynamic_cast<const ConfigOptionFloat*>(opt_old)->value == rhs.get_abs_value(opt_key)
: *opt_rhs == *opt_old)
// no need to update
continue;
}