Allow Drag/Drop into replace implicit cells

This commit is contained in:
manongjohn 2022-01-10 00:36:43 -05:00
parent e2480be5e0
commit 0cb03efb07
2 changed files with 5 additions and 2 deletions

View file

@ -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;

View file

@ -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;
}