diff --git a/toonz/sources/common/timage_io/tlevel_io.cpp b/toonz/sources/common/timage_io/tlevel_io.cpp index 3100832..0a62826 100644 --- a/toonz/sources/common/timage_io/tlevel_io.cpp +++ b/toonz/sources/common/timage_io/tlevel_io.cpp @@ -66,7 +66,7 @@ namespace { bool myLess(const TFilePath &l, const TFilePath &r) { return l.getFrame() < r.getFrame(); } -} +} // namespace //----------------------------------------------------------- @@ -184,7 +184,7 @@ TLevelWriter::TLevelWriter(const TFilePath &path, TPropertyGroup *prop) , m_path(path) , m_properties(prop) , m_contentHistory(0) { - string ext = path.getType(); + string ext = path.getType(); if (!prop) m_properties = Tiio::makeWriterProperties(ext); } @@ -282,8 +282,12 @@ void TLevelWriter::renumberFids(const std::map &table) { QString::fromStdWString(m_path.getParentDir().getWideString())); parentDir.setFilter(QDir::Files); - QStringList nameFilters(QString::fromStdWString(m_path.getWideName()) + - ".*." + QString::fromStdString(m_path.getType())); + QStringList nameFilters; + // check for both period and underscore + nameFilters << QString::fromStdWString(m_path.getWideName()) + ".*." + + QString::fromStdString(m_path.getType()) + << QString::fromStdWString(m_path.getWideName()) + "_*." + + QString::fromStdString(m_path.getType()); parentDir.setNameFilters(nameFilters); TFilePathSet fpset; diff --git a/toonz/sources/toonz/cellselection.cpp b/toonz/sources/toonz/cellselection.cpp index 608fce3..23b24f6 100644 --- a/toonz/sources/toonz/cellselection.cpp +++ b/toonz/sources/toonz/cellselection.cpp @@ -2708,7 +2708,8 @@ static void dRenumberCells(int col, int r0, int r1) { TXshSimpleLevel *sl = cell.getSimpleLevel(); TFrameId oldFid = cell.getFrameId(); - TFrameId newFid = TFrameId(r + 1); + TFrameId newFid = + TFrameId(r + 1, 0, oldFid.getZeroPadding(), oldFid.getStartSeqInd()); toCell.m_level = sl; toCell.m_frameId = newFid; @@ -2728,7 +2729,8 @@ static void dRenumberCells(int col, int r0, int r1) { it->first.getSimpleLevel()->isFid(it->second.getFrameId())) { TFrameId &fid = it->second.m_frameId; fid = TFrameId(fid.getNumber(), - fid.getLetter() ? fid.getLetter() + 1 : 'a'); + fid.getLetter() ? fid.getLetter() + 1 : 'a', + fid.getZeroPadding(), fid.getStartSeqInd()); } } }