diff --git a/sane/scanner.cpp b/sane/scanner.cpp index 4bf4e7c..b36aa38 100644 --- a/sane/scanner.cpp +++ b/sane/scanner.cpp @@ -2442,15 +2442,19 @@ COM_API_IMPLEMENT(scanner, int, start(void)) //} else { - if (callback::show_progress_ui && is_bIndicator) - { - int ev = SANE_EVENT_WORKING; - - // on_ui_event(ev, (void*)ev); - ui_notify(SANE_EVENT_SCAN_FINISHED, (void *)hg_scanner_err_description(ret), ret); - } - else + // display error message on progress UI, may be closed immediately by APP, so we hide progress UI and call message_box ... + // + //if (callback::show_progress_ui && is_bIndicator) + //{ + // int ev = SANE_EVENT_WORKING; + // + //// on_ui_event(ev, (void*)ev); + // 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) {