修复启动失败消息一闪而过的问题

This commit is contained in:
gb 2023-05-24 17:37:59 +08:00
parent 886befed81
commit 5ac2aca692
1 changed files with 12 additions and 8 deletions

View File

@ -2442,15 +2442,19 @@ COM_API_IMPLEMENT(scanner, int, start(void))
//} //}
else else
{ {
if (callback::show_progress_ui && is_bIndicator) // display error message on progress UI, may be closed immediately by APP, so we hide progress UI and call message_box ...
{ //
int ev = SANE_EVENT_WORKING; //if (callback::show_progress_ui && is_bIndicator)
//{
// on_ui_event(ev, (void*)ev); // int ev = SANE_EVENT_WORKING;
ui_notify(SANE_EVENT_SCAN_FINISHED, (void *)hg_scanner_err_description(ret), ret); //
} //// on_ui_event(ev, (void*)ev);
else // ui_notify(SANE_EVENT_SCAN_FINISHED, (void *)hg_scanner_err_description(ret), ret);
//}
//else
{ {
if (callback::close_ui)
callback::close_ui(UI_INDICATOR);
if (callback::show_messagebox_ui) if (callback::show_messagebox_ui)
{ {