diff --git a/app/scanner2/HGImgThumb.cpp b/app/scanner2/HGImgThumb.cpp index f56acc62..3fa3e79f 100644 --- a/app/scanner2/HGImgThumb.cpp +++ b/app/scanner2/HGImgThumb.cpp @@ -1166,6 +1166,7 @@ HGResult HGImgThumb::insertItems(const QStringList &fileNames, int pos, bool app bool findInThumb = false; std::vector stdFileNames; + int count = 0; for (int i = 0; i < (int)fileNames.size(); ++i) { QString stdFileName = getStdFileName(fileNames[i]); @@ -1205,17 +1206,22 @@ HGResult HGImgThumb::insertItems(const QStringList &fileNames, int pos, bool app stdFileNames.push_back(stdFileName); } + else + { + count++; + } } } - if (stdFileNames.empty()) + if (count > 0) { if (!fileNames.empty()) { QMessageBox::information(this, tr("tips"), tr("unsupported file format")); } - return HGBASE_ERR_INVALIDARG; + if (stdFileNames.size() == 0) + return HGBASE_ERR_INVALIDARG; } bool isMove = false;