From 0cb03efb07058b3cb64dc7f8b72b941d9b04ae17 Mon Sep 17 00:00:00 2001 From: manongjohn Date: Mon, 10 Jan 2022 00:36:43 -0500 Subject: [PATCH] Allow Drag/Drop into replace implicit cells --- toonz/sources/toonz/iocommand.cpp | 4 +++- toonz/sources/toonz/xsheetdragtool.cpp | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/toonz/sources/toonz/iocommand.cpp b/toonz/sources/toonz/iocommand.cpp index 24967c57..b996178b 100644 --- a/toonz/sources/toonz/iocommand.cpp +++ b/toonz/sources/toonz/iocommand.cpp @@ -322,7 +322,9 @@ bool beforeCellsInsert(TXsheet *xsh, int row, int &col, int rowCount, int i = 0; TXshColumn *column = xsh->getColumn(col); - for (i = 0; i < rowCount && xsh->getCell(row + i, col).isEmpty(); i++) { + for (i = 0; i < rowCount && (xsh->getCell(row + i, col).isEmpty() || + xsh->isImplicitCell(row + i, col)); + i++) { } int type = (column && !column->isEmpty()) ? column->getColumnType() : newLevelColumnType; diff --git a/toonz/sources/toonz/xsheetdragtool.cpp b/toonz/sources/toonz/xsheetdragtool.cpp index 3de23076..ea488886 100644 --- a/toonz/sources/toonz/xsheetdragtool.cpp +++ b/toonz/sources/toonz/xsheetdragtool.cpp @@ -2063,7 +2063,8 @@ protected: getViewer()->orientation()->isVerticalTimeline()); for (c = col; c < rect.getLx() + col; c++) { for (r = row; r < rect.getLy() + row; r++) - if (!xsh->getCell(r, c).isEmpty()) return false; + if (!xsh->getCell(r, c).isEmpty() && !xsh->isImplicitCell(r, c)) + return false; } return true; }