mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-27 01:58:36 -07:00
FIX: object params variant crash
Change-Id: Ia67b98c29a0cc97f8479911ffdefb942cb6c751f Jira: none (cherry picked from commit 8bf65c0963d1ee39bba12f67f33177d4ac6d6a60)
This commit is contained in:
parent
2a35173b8c
commit
660d2ee686
4 changed files with 26 additions and 7 deletions
|
|
@ -1015,8 +1015,8 @@ void CheckBox::set_value(const boost::any& value, bool change_event)
|
|||
m_disable_change_event = !change_event;
|
||||
if (m_opt.nullable) {
|
||||
const bool is_value_unsigned_char = value.type() == typeid(unsigned char);
|
||||
m_is_na_val = is_value_unsigned_char &&
|
||||
boost::any_cast<unsigned char>(value) == ConfigOptionBoolsNullable::nil_value();
|
||||
m_is_na_val = value.empty() || (is_value_unsigned_char &&
|
||||
boost::any_cast<unsigned char>(value) == ConfigOptionBoolsNullable::nil_value());
|
||||
if (!m_is_na_val)
|
||||
m_last_meaningful_value = is_value_unsigned_char ? value : static_cast<unsigned char>(boost::any_cast<bool>(value));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue