fixed bug-167:处理导出单张图片文件名错误

This commit is contained in:
yangjiaxuan 2022-06-06 11:58:49 +08:00
parent 50c639a78e
commit 786a73bf33
1 changed files with 6 additions and 1 deletions

View File

@ -149,7 +149,12 @@ void Dialog_ExportImageFile::ThreadFunc(HGThread thread, HGPointer param)
if (nullptr != img)
{
char fileName[512];
sprintf(fileName, "%s%03d", getStdString(p->m_destName).c_str(), index);
if(p->m_srcFiles.size() > 1)
{
sprintf(fileName, "%s%03d", getStdString(p->m_destName).c_str(), index);
}else
sprintf(fileName, "%s", getStdString(p->m_destName).c_str());
++index;
QString saveFileName = p->m_destPath + QString(StdStringToUtf8(fileName).c_str()) + p->m_destExt;