Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Modify Ctrl behavior in XSheet: enable drag with Ctrl, and copy with Ctrl + Alt

Abel You0252cf6e2b86
diff --git a/toonz/sources/toonz/xshcellmover.cpp b/toonz/sources/toonz/xshcellmover.cpp
index 787174f57..8399ad9f9 100644
--- a/toonz/sources/toonz/xshcellmover.cpp
+++ b/toonz/sources/toonz/xshcellmover.cpp
@@ -552,7 +552,7 @@ void LevelMoverTool::onClick(const QMouseEvent *e) {
m_qualifiers = 0;
if (Preferences::instance()->getDragCellsBehaviour() == 1)
m_qualifiers |= CellsMover::eMoveColumns;
- if (e->modifiers() & Qt::ControlModifier)
+ if ((e->modifiers() == (Qt::ControlModifier | Qt::AltModifier)))
m_qualifiers |= CellsMover::eCopyCells;
if (e->modifiers() & Qt::ShiftModifier)
m_qualifiers |= CellsMover::eInsertCells;
diff --git a/toonz/sources/toonz/xshcellviewer.cpp b/toonz/sources/toonz/xshcellviewer.cpp
index e758eba85..82ad949e8 100644
--- a/toonz/sources/toonz/xshcellviewer.cpp
+++ b/toonz/sources/toonz/xshcellviewer.cpp
@@ -3352,7 +3352,9 @@ void CellArea::mousePressEvent(QMouseEvent *event) {
} else if ((!xsh->getCell(row, col).isEmpty()) &&
o->rect(PredefinedRect::DRAG_AREA)
.adjusted(0, 0, -frameAdj.x(), -frameAdj.y())
- .contains(mouseInCell)) {
+ .contains(mouseInCell) ||
+ // Or Control Pressed
+ event->modifiers() & Qt::ControlModifier) {
TXshColumn *column = xsh->getColumn(col);
if (column && !m_viewer->getCellSelection()->isCellSelected(row, col)) {
int r0, r1;