diff --git a/modules/twainui/hg_settingdialog.cpp b/modules/twainui/hg_settingdialog.cpp index c6846097..afae8201 100644 --- a/modules/twainui/hg_settingdialog.cpp +++ b/modules/twainui/hg_settingdialog.cpp @@ -1290,6 +1290,22 @@ void hg_settingdialog::slot_string_list_comboBoxClicked() } } + if (0 == strcmp(opt->name, SANE_STD_OPT_NAME_SCAN_MODE)) + { + if (comboBox->currentText() == OPTION_VALUE_SMZS_SMZDZS) + { + SANE_Int scanCount = 0; + int scan_count_id = 0; + find_option_description(SANE_STD_OPT_NAME_SCAN_COUNT, &scan_count_id); + SANE_Status ret = m_saneAPI.sane_control_option_api(m_devHandle, scan_count_id, SANE_ACTION_GET_VALUE, &scanCount, &method); + if (scanCount < 2) + { + SANE_Int value = 1; + ret = m_saneAPI.sane_control_option_api(m_devHandle, scan_count_id, SANE_ACTION_SET_VALUE, &value, &method); + } + } + } + updateRestorePushButton(); }