mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
FIX: filament variant index & override nil value
Change-Id: I828fff09df39a60d59af516c969466d9b09e503f Jira: none (cherry picked from commit 1745657e222b8e9d7c96fcca16581b2deac526c6)
This commit is contained in:
@@ -951,7 +951,7 @@ boost::any ConfigOptionsGroup::get_config_value(const DynamicPrintConfig& config
|
||||
{
|
||||
case coPercents:
|
||||
case coFloats: {
|
||||
if (config.option(opt_key)->is_nil())
|
||||
if (opt_index < 0 ? config.option(opt_key)->is_nil() : dynamic_cast<ConfigOptionVectorBase const*>(config.option(opt_key))->is_nil(opt_index))
|
||||
ret = _(L("N/A"));
|
||||
else {
|
||||
double val = opt->type == coFloats ?
|
||||
@@ -961,7 +961,7 @@ boost::any ConfigOptionsGroup::get_config_value(const DynamicPrintConfig& config
|
||||
}
|
||||
break;
|
||||
case coFloatsOrPercents: {
|
||||
if (config.option(opt_key)->is_nil())
|
||||
if (opt_index < 0 ? config.option(opt_key)->is_nil() : dynamic_cast<ConfigOptionVectorBase const*>(config.option(opt_key))->is_nil(opt_index))
|
||||
ret = _(L("N/A"));
|
||||
else {
|
||||
const auto& value = config.option<ConfigOptionFloatsOrPercentsNullable>(opt_key)->get_at(idx);
|
||||
|
||||
Reference in New Issue
Block a user