OpenToonz - An open-source full-featured 2D animation creation software
C
disable drag-moving cells option by Contrail Co.,Ltd.
shun-iwasawa64b3dfcec6d0
diff --git a/toonz/sources/common/tsound/tsound.cpp b/toonz/sources/common/tsound/tsound.cppindex 1bb7c48ed..a887d9040 100644--- a/toonz/sources/common/tsound/tsound.cpp+++ b/toonz/sources/common/tsound/tsound.cpp@@ -82,7 +82,7 @@ TSoundTrackP TSoundTrack::create(TUINT32 sampleRate, int bitPerSample,int channelCount, TINT32 sampleCount,int sampleType) {TSoundTrackP st = 0;- int type = bitPerSample + channelCount;+ int type = bitPerSample + channelCount;switch (type) {case TRK_M8:if (sampleType == TSound::INT)diff --git a/toonz/sources/toonz/preferencespopup.cpp b/toonz/sources/toonz/preferencespopup.cppindex e0199df39..563072b53 100644--- a/toonz/sources/toonz/preferencespopup.cpp+++ b/toonz/sources/toonz/preferencespopup.cpp@@ -1432,7 +1432,9 @@ QList<ComboBoxItem> PreferencesPopup::getComboItemList({tr("Display on Column Header"),Preferences::ShowLevelNameOnColumnHeader}}},{DragCellsBehaviour,- {{tr("Cells Only"), 0}, {tr("Cells and Column Data"), 1}}},+ {{tr("Cells Only"), 0},+ {tr("Cells and Column Data"), 1},+ {tr("Disable Dragging Cells"), 2}}},{deleteCommandBehavior,{{tr("Clear Cell / Frame"), 0},{tr("Remove and Shift Cells / Frames Up"), 1}}},diff --git a/toonz/sources/toonz/xshcellviewer.cpp b/toonz/sources/toonz/xshcellviewer.cppindex bf27a8be6..7ec626a6d 100644--- a/toonz/sources/toonz/xshcellviewer.cpp+++ b/toonz/sources/toonz/xshcellviewer.cpp@@ -1413,6 +1413,9 @@ void CellArea::drawExtenderHandles(QPainter &p) {TCellSelection *cellSelection = m_viewer->getCellSelection();if (cellSelection->isEmpty() || m_viewer->areSoundCellsSelected()) return;+ // if the drag move is disabled, the extender handles won't appear+ if (Preferences::instance()->getDragCellsBehaviour() == 2) return;+int selRow0, selCol0, selRow1, selCol1;cellSelection->getSelectedCells(selRow0, selCol0, selRow1, selCol1);@@ -3332,7 +3335,7 @@ void CellArea::mousePressEvent(QMouseEvent *event) {if (TCellKeyframeSelection *cellKeyframeSelection =dynamic_cast<TCellKeyframeSelection *>(selection))setDragTool(XsheetGUI::DragTool::makeCellKeyframeMoverTool(m_viewer));- else+ else if (Preferences::instance()->getDragCellsBehaviour() != 2)setDragTool(XsheetGUI::DragTool::makeLevelMoverTool(m_viewer));} else {m_viewer->getKeyframeSelection()->selectNone();diff --git a/toonz/sources/toonzlib/txshsoundcolumn.cpp b/toonz/sources/toonzlib/txshsoundcolumn.cppindex 34b2c7332..d84fa3e07 100644--- a/toonz/sources/toonzlib/txshsoundcolumn.cpp+++ b/toonz/sources/toonzlib/txshsoundcolumn.cpp@@ -447,7 +447,7 @@ bool TXshSoundColumn::setCell(int row, const TXshCell &cell,if (isBeforeLevelInSequence) {int oldEndOffset = lBefore->getEndOffset();int endOffset = (lBefore->getVisibleEndFrame() != row) ? oldEndOffset - 1- : oldEndOffset;+ : oldEndOffset;if (isNextLevelInSequence) {endOffset = lNext->getEndOffset();// Se precedente e successivo sono diversi elimino il successivo (caso in@@ -468,8 +468,8 @@ bool TXshSoundColumn::setCell(int row, const TXshCell &cell,if (isNextLevelInSequence) {int oldStartOffset = lNext->getStartOffset();int startOffset = (lNext->getVisibleStartFrame() != row)- ? oldStartOffset - 1- : oldStartOffset;+ ? oldStartOffset - 1+ : oldStartOffset;if (l && l != lNext) {if (l->getVisibleFrameCount() == 1)removeColumnLevel(l);