解决切换到指定扫描数量,此时默认数量为1,但是不生效的问题;
This commit is contained in:
parent
cee72c5360
commit
be34c8af51
|
@ -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();
|
updateRestorePushButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue