调整disable
This commit is contained in:
parent
4daa005cf8
commit
5423b3da3f
|
@ -117,7 +117,7 @@ HGResult DeviceUser::ClearDeviceLog()
|
|||
void HGAPI DeviceUser::DSCloseReqFunc(HGTwainDS ds, HGPointer param)
|
||||
{
|
||||
DeviceUser* p = (DeviceUser*)param;
|
||||
emit p->closeReq();
|
||||
HGTwain_DisableDS(p->m_twainDS);
|
||||
}
|
||||
|
||||
void HGAPI DeviceUser::DSImageFunc(HGTwainDS ds, HGImage image, HGPointer param)
|
||||
|
@ -133,8 +133,8 @@ void HGAPI DeviceUser::DSImageFunc(HGTwainDS ds, HGImage image, HGPointer param)
|
|||
|
||||
void DeviceUser::on_closeReq()
|
||||
{
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
HGTwain_DisableDS(m_twainDS);
|
||||
// std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
// HGTwain_DisableDS(m_twainDS);
|
||||
}
|
||||
|
||||
#else
|
||||
|
|
|
@ -557,6 +557,11 @@ HGResult HGTwainDSImpl::Enable(HGBool showUI, HWND parent, HGDSCloseReqFunc even
|
|||
return HGTWAIN_ERR_FAIL;
|
||||
}
|
||||
|
||||
if (!showUI)
|
||||
{
|
||||
HGBase_SetEvent(m_event);
|
||||
}
|
||||
|
||||
m_showUI = showUI;
|
||||
m_parent = parent;
|
||||
m_eventFunc = eventFunc;
|
||||
|
@ -944,6 +949,6 @@ void HGAPI HGTwainDSImpl::ThreadFunc(HGThread thread, HGPointer param)
|
|||
}
|
||||
}
|
||||
|
||||
p->Reset();
|
||||
p->Disable();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue