OpenToonz - An open-source full-featured 2D animation creation software
C
clang format
shun-iwasawa8f75987ed50a
diff --git a/toonz/sources/tnztools/skeletontool.cpp b/toonz/sources/tnztools/skeletontool.cppindex 14b6d97ec..c6d52b642 100644--- a/toonz/sources/tnztools/skeletontool.cpp+++ b/toonz/sources/tnztools/skeletontool.cpp@@ -116,7 +116,7 @@ static void getHooks(std::vector<HookData> &hooks, TXsheet *xsh, int row,getDpiAffine(cell.m_level->getSimpleLevel(), cell.m_frameId, true);// center (inches)- TPointD center = xsh->getCenter(columnId, row); // getHooks+ TPointD center = xsh->getCenter(columnId, row); // getHooksif (handleIsHook) center = TPointD(0, 0);// add the hook #0 (i.e. the regular center)@@ -350,7 +350,7 @@ void SkeletonTool::leftButtonDown(const TPointD &ppos, const TMouseEvent &e) {if (selectedDevice == TD_IncrementDrawing)d = 1;else if (selectedDevice == TD_DecrementDrawing)- d = -1;+ d = -1;m_dragTool = new ChangeDrawingTool(this, d);m_dragTool->leftButtonDown(ppos, e);return;@@ -414,21 +414,21 @@ void SkeletonTool::leftButtonDown(const TPointD &ppos, const TMouseEvent &e) {// lock/unlock: modalita IKif (TD_LockStageObject <= m_device && m_device < TD_LockStageObject + 1000) {- Skeleton* skeleton = new Skeleton();- buildSkeleton(*skeleton, currentColumnIndex);+ Skeleton *skeleton = new Skeleton();+ buildSkeleton(*skeleton, currentColumnIndex);int columnIndex = m_device - TD_LockStageObject;- int frame = app->getCurrentFrame()->getFrame();- if (skeleton->getBoneByColumnIndex(columnIndex) == skeleton->getRootBone()) {- app->getCurrentColumn()->setColumnIndex(columnIndex);- m_device = TD_Translation;- }- else if (e.isShiftPressed()) {- togglePinnedStatus(columnIndex, frame, e.isShiftPressed());- invalidate();- m_dragTool = 0;- return;- }- else return;+ int frame = app->getCurrentFrame()->getFrame();+ if (skeleton->getBoneByColumnIndex(columnIndex) ==+ skeleton->getRootBone()) {+ app->getCurrentColumn()->setColumnIndex(columnIndex);+ m_device = TD_Translation;+ } else if (e.isShiftPressed()) {+ togglePinnedStatus(columnIndex, frame, e.isShiftPressed());+ invalidate();+ m_dragTool = 0;+ return;+ } else+ return;}switch (m_device) {@@ -572,8 +572,8 @@ public:void notify() const {m_tool->invalidate();- TXsheet *xsh = getXsheet();- int index = m_columnIndex;+ TXsheet *xsh = getXsheet();+ int index = m_columnIndex;if (index < 0) index = m_oldColumnIndex;if (index >= 0) {TStageObjectId id = TStageObjectId::ColumnId(index);diff --git a/toonz/sources/toonz/cellselection.cpp b/toonz/sources/toonz/cellselection.cppindex 93a465194..9452959dc 100644--- a/toonz/sources/toonz/cellselection.cpp+++ b/toonz/sources/toonz/cellselection.cpp@@ -2007,11 +2007,11 @@ void TCellSelection::pasteDuplicateCells() {DVGui::warning(QObject::tr("Cannot duplicate frames in read only levels"));return;- }- else if (level->getSimpleLevel() && it->getFrameId() == TFrameId::NO_FRAME) {- DVGui::warning(- QObject::tr("Can only duplicate frames in image sequence levels."));- return;+ } else if (level->getSimpleLevel() &&+ it->getFrameId() == TFrameId::NO_FRAME) {+ DVGui::warning(QObject::tr(+ "Can only duplicate frames in image sequence levels."));+ return;}}it++;@@ -2173,9 +2173,8 @@ void TCellSelection::pasteDuplicateCells() {return;}TKeyframeSelection selection;- if (isEmpty() &&- TApp::instance()->getCurrentObject()->getObjectId() ==- TStageObjectId::CameraId(xsh->getCameraColumnIndex()))+ if (isEmpty() && TApp::instance()->getCurrentObject()->getObjectId() ==+ TStageObjectId::CameraId(xsh->getCameraColumnIndex()))// Se la selezione e' vuota e l'objectId e' quello della camera sono nella// colonna di camera quindi devo selezionare la row corrente e -1.{@@ -2865,8 +2864,7 @@ static void createNewDrawing(TXsheet *xsh, int row, int col,const Type *Var = dynamic_cast<const Type *>(Data)void TCellSelection::dPasteCells() {- if (isEmpty())- return;+ if (isEmpty()) return;int r0, c0, r1, c1;getSelectedCells(r0, c0, r1, c1);TUndoManager::manager()->beginBlock();@@ -2874,10 +2872,10 @@ void TCellSelection::dPasteCells() {QClipboard *clipboard = QApplication::clipboard();const QMimeData *mimeData = clipboard->mimeData();if (DYNAMIC_CAST(TCellData, cellData, mimeData)) {- if (!cellData->canChange(xsh, c0)) {- TUndoManager::manager()->endBlock();- return;- }+ if (!cellData->canChange(xsh, c0)) {+ TUndoManager::manager()->endBlock();+ return;+ }for (int c = 0; c < cellData->getColCount(); c++) {for (int r = 0; r < cellData->getRowCount(); r++) {TXshCell src = cellData->getCell(r, c);diff --git a/toonz/sources/toonzqt/functionpaneltools.cpp b/toonz/sources/toonzqt/functionpaneltools.cppindex 6d255a3be..679699f7d 100644--- a/toonz/sources/toonzqt/functionpaneltools.cpp+++ b/toonz/sources/toonzqt/functionpaneltools.cpp@@ -106,7 +106,7 @@ MovePointDragTool::MovePointDragTool(FunctionPanel *panel, TDoubleParam *curve), m_speed1Index(-1), m_groupEnabled(false), m_selection(0) {- // This undo block is closed in the destructor+ // This undo block is closed in the destructorTUndoManager::manager()->beginBlock();if (curve) {diff --git a/toonz/sources/toonzqt/fxselection.cpp b/toonz/sources/toonzqt/fxselection.cppindex 07983d725..873c60882 100644--- a/toonz/sources/toonzqt/fxselection.cpp+++ b/toonz/sources/toonzqt/fxselection.cpp@@ -261,8 +261,8 @@ bool FxSelection::insertPasteSelection() {// auto ends the undo block in the destructor.if (!auto_.m_destruct) {- auto_.m_destruct = true;- TUndoManager::manager()->beginBlock();+ auto_.m_destruct = true;+ TUndoManager::manager()->beginBlock();}TFxCommand::insertPasteFxs(selectedLinks[i], fxs.toStdList(),@@ -384,7 +384,7 @@ void FxSelection::ungroupSelection() {TUndoManager::manager()->beginBlock();QSet<int>::iterator it;for (it = idSet.begin(); it != idSet.end(); it++) {- TFxCommand::ungroupFxs(*it, m_xshHandle);+ TFxCommand::ungroupFxs(*it, m_xshHandle);}TUndoManager::manager()->endBlock();selectNone();