Merge pull request #3200 from martinvanzijl/issue-2945-allow-load-levels-with-numeric-name

Allow loading levels/images with numeric names
This commit is contained in:
Rodney 2020-04-01 21:39:00 -05:00 committed by GitHub
commit 83e2a21487
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -622,7 +622,8 @@ std::wstring TFilePath::getLevelNameW() const {
if (j == i || j - i == 1) // prova.tif o prova..tif if (j == i || j - i == 1) // prova.tif o prova..tif
return str; return str;
if (!checkForSeqNum(type) || !isNumbers(str, i, j)) return str; if (!checkForSeqNum(type) || !isNumbers(str, i, j) ||
i == (int)std::wstring::npos) return str;
// prova.0001.tif // prova.0001.tif
return str.erase(i + 1, j - i - 1); return str.erase(i + 1, j - i - 1);
} }