修复判断语言属性ID错误

This commit is contained in:
gb 2023-06-19 11:16:57 +08:00
parent 57104089e2
commit 21be8eb172
1 changed files with 2 additions and 2 deletions

View File

@ -1979,7 +1979,7 @@ SANE_Status hg_sane_middleware::set_option(SANE_Handle h, const void* option, SA
{
VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "the setting '%s' affects other options value, RELOAD ...\n", desc_title.c_str());
//on_SCANNER_ERR_CONFIGURATION_CHANGED(dev);
if(dev->fixed_id.count(SANE_OPT_ID_LANGUAGE) && dev->fixed_id[SANE_OPT_ID_LANGUAGE] != id) // language reload by callback already
if(dev->fixed_id.count(SANE_OPT_ID_LANGUAGE) == 0 || dev->fixed_id[SANE_OPT_ID_LANGUAGE] != id) // language reload by callback already
reload_options(handle);
err = (scanner_err)SANE_INFO_RELOAD_OPTIONS;
}
@ -1992,7 +1992,7 @@ SANE_Status hg_sane_middleware::set_option(SANE_Handle h, const void* option, SA
{
VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "the setting '%s' affects image parameter and options, APP should re-get image info and reload options...\n", desc_title.c_str());
//on_SCANNER_ERR_CONFIGURATION_CHANGED(dev);
if (dev->fixed_id.count(SANE_OPT_ID_LANGUAGE) && dev->fixed_id[SANE_OPT_ID_LANGUAGE] != id) // language reload by callback already
if (dev->fixed_id.count(SANE_OPT_ID_LANGUAGE) == 0 || dev->fixed_id[SANE_OPT_ID_LANGUAGE] != id) // language reload by callback already
reload_options(handle);
err = (scanner_err)(SANE_INFO_RELOAD_PARAMS | SANE_INFO_RELOAD_OPTIONS);
}