解决进度指示器扫描不显示取消扫描

This commit is contained in:
yangjiaxuan 2023-11-16 16:43:43 +08:00
parent 6b99063ba9
commit 45a40c7a5b
1 changed files with 3 additions and 2 deletions

View File

@ -823,6 +823,7 @@ void scanner::scan_done(void)
// on_ui_event(SANE_EVENT_SCAN_FINISHED, (void*)SANE_EVENT_SCAN_FINISHED); // on_ui_event(SANE_EVENT_SCAN_FINISHED, (void*)SANE_EVENT_SCAN_FINISHED);
//} //}
// is_scanning_ = false; // is_scanning_ = false;
is_in_working_thread_ = false;
} }
// IRef // IRef
@ -1639,7 +1640,7 @@ int scanner::thread_start(void)
ui_notify(SANE_EVENT_SCAN_FINISHED, (void *)hg_scanner_err_description(ret), ret); ui_notify(SANE_EVENT_SCAN_FINISHED, (void *)hg_scanner_err_description(ret), ret);
} }
else else if(!is_in_working_thread_)
#endif #endif
{ {
scan_over_ = true; scan_over_ = true;
@ -3746,7 +3747,7 @@ int scanner::handle_device_event(int ev_code, void* data, unsigned int* len)
} }
else else
{ {
is_in_working_thread_ = false; //is_in_working_thread_ = false;
err_ = *len; err_ = *len;
scan_over_ = true; scan_over_ = true;
scan_msg_ = data ? (char*)data : "OK"; scan_msg_ = data ? (char*)data : "OK";