ENH: config: process object config values after printer switch

jira: no-jira
Change-Id: I01532c42c20aa63b1b9621e175a98cad06bdf577
(cherry picked from commit cc86a62d408cb40942c49277a7f239144d7a5567)
This commit is contained in:
lane.wei 2024-11-23 16:59:54 +08:00 committed by Noisyfox
parent b8f8151340
commit 1297857f66
4 changed files with 189 additions and 3 deletions

View file

@ -872,9 +872,9 @@ void TextCtrl::propagate_value()
void TextCtrl::set_value(const boost::any& value, bool change_event/* = false*/) {
m_disable_change_event = !change_event;
if (m_opt.nullable) {
if (boost::any_cast<wxString>(value) != _(L("N/A")))
const bool m_is_na_val = value.empty() || (boost::any_cast<wxString>(value) == _(L("N/A")));
if (!m_is_na_val)
m_last_meaningful_value = value;
text_ctrl()->SetValue(boost::any_cast<wxString>(value)); // BBS
}
else