fix crash on inserting multiple keys

This commit is contained in:
shun-iwasawa 2020-01-08 17:14:00 +09:00
parent bf25486844
commit 6b556893bf

View file

@ -361,14 +361,9 @@ void GlobalKeyframeUndo::doInsertGlobalKeyframes(
int frame, const std::vector<int> &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<int> &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;