This commit is contained in:
yangjiaxuan 2023-03-07 13:59:10 +08:00
parent 3efb8b0d3a
commit efeb97b14c
1 changed files with 8 additions and 5 deletions

View File

@ -276,9 +276,13 @@ void Form_mainInterface::on_testOpenCacheFile(QString name)
{
if (name == HGPDTTOOLDB_NAME_IMAGE_GRAY_QUALITY && m_curDpi == 600)
{
if (m_view != nullptr)
if (m_multiIndex != -1)
{
m_view->doubleClicked();
QString cacheFilePath = getCachePath();
QFileInfo fileInfo(cacheFilePath);
auto pathDir = fileInfo.path();
QString strFilePath = "file:///" + pathDir;
QDesktopServices::openUrl(QUrl(strFilePath));
}
}
}
@ -287,9 +291,8 @@ void Form_mainInterface::on_viewerDblClick()
{
if (m_multiIndex != -1)
{
// QString strFileName = m_list_images[m_multiIndex];
QString cacheFilePath = getCachePath();
QFileInfo fileInfo(cacheFilePath);
QString strFileName = m_list_images[m_multiIndex];
QFileInfo fileInfo(strFileName);
auto pathDir = fileInfo.path();
QString strFilePath = "file:///" + pathDir;
QDesktopServices::openUrl(QUrl(strFilePath));