OpenToonz - An open-source full-featured 2D animation creation software
C
Re-introduce holding Ctrl to Drag Cells and holding Shift to Scroll Cells
Abel You5c60751d1f3f
diff --git a/toonz/sources/toonz/xshcellmover.cpp b/toonz/sources/toonz/xshcellmover.cppindex dc34f33e2..7049738de 100644--- a/toonz/sources/toonz/xshcellmover.cpp+++ b/toonz/sources/toonz/xshcellmover.cpp@@ -189,7 +189,8 @@ void CellsMover::moveCells(const TPoint &pos) const {}setCells(m_cells, r, c);- // Act like implicit hold when dragging Frame cell+ // Act like implicit hold when dragging cells with pressing Shift key+ // or dragging Frame cell// ( and WITHOUT Alt key ) and dragging within the same column.if (m_qualifiers & eInsertCells && !(m_qualifiers & eOverwriteCells)) {int startCol =@@ -557,9 +558,11 @@ void LevelMoverTool::onClick(const QMouseEvent *e) {m_qualifiers |= CellsMover::eMoveColumns;if ((e->modifiers() == (Qt::ControlModifier | Qt::AltModifier)))m_qualifiers |= CellsMover::eCopyCells;- if (getViewer()->getXsheet()->getCell(cellPosition)- != getViewer()->getXsheet()->getCell(row-1, col) &&- (row>=r0 && row<=r1))+ if (e->modifiers() & Qt::ShiftModifier ||+ // Or Dragging Frame Cell+ (r0 == r1 && c0 == c1) &&+ getViewer()->getXsheet()->getCell(cellPosition)+ != getViewer()->getXsheet()->getCell(row - 1, col))m_qualifiers |= CellsMover::eInsertCells;if (e->modifiers() & Qt::AltModifier)m_qualifiers |= CellsMover::eOverwriteCells;diff --git a/toonz/sources/toonz/xshcellviewer.cpp b/toonz/sources/toonz/xshcellviewer.cppindex f20aa5cde..a2d9daed1 100644--- a/toonz/sources/toonz/xshcellviewer.cpp+++ b/toonz/sources/toonz/xshcellviewer.cpp@@ -3368,17 +3368,18 @@ void CellArea::mousePressEvent(QMouseEvent *event) {m_viewer->getKeyframeSelection()->selectNone();setDragTool(XsheetGUI::DragTool::makeLevelExtenderTool(m_viewer, false, true));- }+ }// Drag Event- else if (((Preferences::instance()->isAlwaysDragFrameCell() &&- (!xsh->getCell(row, col).isEmpty()) && xsh->getCell(row, col) != xsh->getCell(row - 1, col) &&- !event->modifiers().testFlag(Qt::ShiftModifier)) ||- o->rect(PredefinedRect::DRAG_AREA).adjusted(0, 0, -frameAdj.x(), -frameAdj.y()).contains(mouseInCell))) {+ else if ((!xsh->getCell(row, col).isEmpty()) &&+ o->rect(PredefinedRect::DRAG_AREA)+ .adjusted(0, 0, -frameAdj.x(), -frameAdj.y())+ .contains(mouseInCell) ||+ // Or Control Pressed+ event->modifiers() & Qt::ControlModifier ||+ //Or Frame Cell Selected+ (Preferences::instance()->isAlwaysDragFrameCell() &&+ (!xsh->getCell(row, col).isEmpty()) && xsh->getCell(row, col) != xsh->getCell(row - 1, col))) {TXshColumn *column = xsh->getColumn(col);-- // If draged cell out of the CellSelection , drag the level- // if (column && !m_viewer->getCellSelection()->isCellSelected(row, col)) {- // IF draged cell is not Frame cell, drag the levelif (column && !m_viewer->getCellSelection()->isCellSelected(row, col)) {if(xsh->getCell(row,col) == xsh->getCell(row - 1, col)) {int r0, r1;diff --git a/toonz/sources/toonz/xsheetdragtool.cpp b/toonz/sources/toonz/xsheetdragtool.cppindex cf98cf479..12b30ffd5 100644--- a/toonz/sources/toonz/xsheetdragtool.cpp+++ b/toonz/sources/toonz/xsheetdragtool.cpp@@ -155,11 +155,10 @@ public:}if (m_modifier & Qt::ControlModifier)getViewer()->getCellKeyframeSelection()->selectCellsKeyframes(r0, c0,- r1, c1);+ r1, c1);elsegetViewer()->getCellSelection()->selectCells(r0, c0, r1, c1);- } // Shift- else {+ } else {if (m_modifier & Qt::ControlModifier)getViewer()->getCellKeyframeSelection()->selectCellsKeyframes(row, col, row, col);