OpenToonz - An open-source full-featured 2D animation creation software
C
fix sequential check (#1997)
shun-iwasawab5e76bca01b1
diff --git a/toonz/sources/common/tsystem/tfilepath.cpp b/toonz/sources/common/tsystem/tfilepath.cppindex 4ca7c80b1..a0954279f 100644--- a/toonz/sources/common/tsystem/tfilepath.cpp+++ b/toonz/sources/common/tsystem/tfilepath.cpp@@ -20,6 +20,7 @@ const char wauxslash = '\\';#include "tfilepath.h"#include "tconvert.h"+#include "tfiletype.h"#include <cmath>#include <cctype>#include <sstream>@@ -73,12 +74,13 @@ bool isNumbers(std::wstring str, int fromSeg, int toSeg) {}bool checkForSeqNum(QString type) {- if (type == "myb" || type == "tlv" || type == "pli" || type == "tpl" ||- type == "tnz")+ TFileType::Type typeInfo = TFileType::getInfoFromExtension(type);+ if ((typeInfo & TFileType::IMAGE) && !(typeInfo & TFileType::LEVEL))+ return true;+ elsereturn false;- return true;}-};+}; // namespace// TFrameId::operator string() conststd::string TFrameId::expand(FrameFormat format) const {@@ -285,10 +287,9 @@ void TFilePath::setPath(std::wstring path) {m_path.length() > 1 && m_path[m_path.length() - 1] == wslash)m_path.erase(m_path.length() - 1, 1);- if (isUncName &&- !(m_path.find_last_of(L'\\') > 1 ||- m_path.find_last_of(L'/') >- 1)) // e' indicato solo il nome della macchina...+ if (isUncName && !(m_path.find_last_of(L'\\') > 1 ||+ m_path.find_last_of(L'/') >+ 1)) // e' indicato solo il nome della macchina...m_path.append(1, wslash);}@@ -631,8 +632,9 @@ TFilePath TFilePath::getParentDir() const // noSlash!{int i = getLastSlash(m_path); // cerco l'ultimo slashif (i < 0) {- if (m_path.length() >= 2 && ('a' <= m_path[0] && m_path[0] <= 'z' ||- 'A' <= m_path[0] && m_path[0] <= 'Z') &&+ if (m_path.length() >= 2 &&+ ('a' <= m_path[0] && m_path[0] <= 'z' ||+ 'A' <= m_path[0] && m_path[0] <= 'Z') &&m_path[1] == ':')return TFilePath(m_path.substr(0, 2));else@@ -683,7 +685,7 @@ TFrameId TFilePath::getFrame() const {digits++;number = number * 10 + str[k] - L'0';}- char letter = '\0';+ char letter = '\0';if (iswalpha(str[k])) letter = str[k++] + ('a' - L'a');if (number == 0 || k < i) // || letter!='\0')