diff --git a/toonz/sources/include/toonz/txshcolumn.h b/toonz/sources/include/toonz/txshcolumn.h index 80e5aaf..fe3fb0f 100644 --- a/toonz/sources/include/toonz/txshcolumn.h +++ b/toonz/sources/include/toonz/txshcolumn.h @@ -265,6 +265,8 @@ Set column color tag to \b colorTag. TPixel32 getFilterColor(); static QPair getFilterInfo(FilterColor key); static void initColorFilters(); + + void resetColumnProperties(); }; #ifdef _WIN32 diff --git a/toonz/sources/toonz/cellselection.cpp b/toonz/sources/toonz/cellselection.cpp index 3459ded..15b93f7 100644 --- a/toonz/sources/toonz/cellselection.cpp +++ b/toonz/sources/toonz/cellselection.cpp @@ -119,6 +119,7 @@ void deleteCellsWithoutUndo(int &r0, int &c0, int &r1, int &c1) { xsh->clearCells(r0, c, r1 - r0 + 1); TXshColumn *column = xsh->getColumn(c); if (column && column->isEmpty()) { + column->resetColumnProperties(); TFx *fx = column->getFx(); if (fx) { int i; @@ -144,6 +145,7 @@ void cutCellsWithoutUndo(int &r0, int &c0, int &r1, int &c1) { xsh->removeCells(r0, c, r1 - r0 + 1); TXshColumn *column = xsh->getColumn(c); if (column && column->isEmpty()) { + column->resetColumnProperties(); TFx *fx = column->getFx(); if (!fx) continue; int i; diff --git a/toonz/sources/toonzlib/txshcolumn.cpp b/toonz/sources/toonzlib/txshcolumn.cpp index 8f29b2d..fb8d5ea 100644 --- a/toonz/sources/toonzlib/txshcolumn.cpp +++ b/toonz/sources/toonzlib/txshcolumn.cpp @@ -476,8 +476,8 @@ TXshColumn::ColumnType TXshColumn::toColumnType(int levelType) { //----------------------------------------------------------------------------- bool TXshColumn::isRendered() const { -// if (!getXsheet() || !getFx()) return false; -// if (!isPreviewVisible()) return false; + // if (!getXsheet() || !getFx()) return false; + // if (!isPreviewVisible()) return false; if (!getXsheet() || !isPreviewVisible()) return false; if (getColumnType() == eSoundType) return true; if (!getFx()) return false; @@ -650,4 +650,13 @@ QPair TXshColumn::getFilterInfo( if (!filterColors.contains(key)) return QPair(QObject::tr("None"), TPixel::Black); return filterColors.value(key); -} \ No newline at end of file +} + +//----------------------------------------------------------------------------- + +void TXshColumn::resetColumnProperties() { + setStatusWord(0); + setOpacity(255); + setColorTag(0); + setFilterColorId(FilterNone); +} diff --git a/toonz/sources/toonzlib/txshlevelcolumn.cpp b/toonz/sources/toonzlib/txshlevelcolumn.cpp index 47c012d..0e1efd8 100644 --- a/toonz/sources/toonzlib/txshlevelcolumn.cpp +++ b/toonz/sources/toonzlib/txshlevelcolumn.cpp @@ -91,6 +91,8 @@ TXshColumn *TXshLevelColumn::clone() const { column->setOpacity(getOpacity()); column->m_cells = m_cells; column->m_first = m_first; + column->setColorTag(getColorTag()); + column->setFilterColorId(getFilterColorId()); // column->updateIcon(); return column; diff --git a/toonz/sources/toonzlib/txshmeshcolumn.cpp b/toonz/sources/toonzlib/txshmeshcolumn.cpp index c9d6867..3af1bdc 100644 --- a/toonz/sources/toonzlib/txshmeshcolumn.cpp +++ b/toonz/sources/toonzlib/txshmeshcolumn.cpp @@ -59,8 +59,11 @@ TXshColumn *TXshMeshColumn::clone() const { TXshMeshColumn *column = new TXshMeshColumn(); column->setStatusWord(getStatusWord()); + column->setOpacity(getOpacity()); column->m_cells = m_cells; column->m_first = m_first; + column->setColorTag(getColorTag()); + column->setFilterColorId(getFilterColorId()); return column; }