This commit is contained in:
luoliangyi 2023-05-31 10:12:38 +08:00
parent d91482d4e7
commit 7374fcc4a5
2 changed files with 5 additions and 4 deletions

View File

@ -60,7 +60,7 @@ DeviceUser::~DeviceUser()
QString DeviceUser::GetName()
{
HGChar devName[256];
HGTwain_GetDSName(m_twainDS, devName, 256);
HGTwain_GetDSDeviceName(m_twainDS, devName, 256);
return QString(devName);
}
@ -217,7 +217,7 @@ DeviceUser::~DeviceUser()
QString DeviceUser::GetName()
{
HGChar devName[256];
HGSane_GetSourceName(m_source, devName, 256);
HGSane_GetDeviceName(m_saneDev, devName, 256);
return QString(devName);
}

View File

@ -3804,6 +3804,8 @@ void MainWindow::on_act_selectDevice_triggered()
m_devUser->Logout();
delete m_devUser;
m_devUser = nullptr;
m_wndStatusBar->setDeviceStatusInfo(tr("Please go to 'Menu Bar ->Scan' to select a device"), false);
updateActionStatus();
}
DeviceUser *devUser = m_devUserMgr->OpenDeviceUser();
@ -3813,7 +3815,6 @@ void MainWindow::on_act_selectDevice_triggered()
m_wndStatusBar->setDeviceStatusInfo(tr("Device %1 is open").arg(m_devUser->GetName()), false);
connect(m_devUser, SIGNAL(newImage(void*)), this, SLOT(on_newImage(void*)), Qt::DirectConnection);
connect(m_devUser, &DeviceUser::scanEvent, this, &MainWindow::on_scanEvent, Qt::QueuedConnection);
updateActionStatus();
}
updateActionStatus();
}