diff --git a/toonz/sources/toonz/xsheetcmd.cpp b/toonz/sources/toonz/xsheetcmd.cpp index 7f29ef7..8308f3a 100644 --- a/toonz/sources/toonz/xsheetcmd.cpp +++ b/toonz/sources/toonz/xsheetcmd.cpp @@ -361,14 +361,9 @@ void GlobalKeyframeUndo::doInsertGlobalKeyframes( int frame, const std::vector &columns) { TXsheet *xsh = TApp::instance()->getCurrentXsheet()->getXsheet(); - int i, colsCount = columns.size(); - int startCol = - Preferences::instance()->isXsheetCameraColumnVisible() ? -1 : 0; - for (i = startCol; i != colsCount; ++i) { + for (const int c : columns) { TStageObjectId objectId; - int c = columns[i]; - TXshColumn *column = xsh->getColumn(c); if (column && column->getSoundColumn()) continue; @@ -393,14 +388,9 @@ void GlobalKeyframeUndo::doRemoveGlobalKeyframes( int frame, const std::vector &columns) { TXsheet *xsh = TApp::instance()->getCurrentXsheet()->getXsheet(); - int i, colsCount = columns.size(); - int startCol = - Preferences::instance()->isXsheetCameraColumnVisible() ? -1 : 0; - for (i = 0; i != colsCount; ++i) { + for (const int c : columns) { TStageObjectId objectId; - int c = columns[i]; - TXshColumn *column = xsh->getColumn(c); if (column && column->getSoundColumn()) continue;