Skip to content

Commit 2bfd050

Browse files
committed
Fix Insert Beats
- Don't move tempo objects at row 0 to avoid multiple issues. - Adjust tempo objects on a single chart when only a sim tempo is found. - Set cursor to start of offset when undoing/redoing.
1 parent d8808f7 commit 2bfd050

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Managers/NoteMan.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,9 @@ String myApplyInsertRows(ReadStream& in, bool undo, bool redo)
505505
myUpdateNotes();
506506
}
507507

508+
// Jump to start row.
509+
gView->setCursorRow(startRow);
510+
508511
target = in.read<Chart*>();
509512
}
510513
return String();

src/Managers/TempoMan.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ void myQueueInsertRows(int startRow, int numRows, bool curChartOnly)
279279
{
280280
myWriteInsertRows(stream, myChart->tempo, startRow, numRows);
281281
}
282+
else
283+
{
284+
myWriteInsertRows(stream, mySimfile->tempo, startRow, numRows);
285+
}
282286
}
283287
else
284288
{
@@ -304,7 +308,7 @@ void myApplyInsertRowsOffset(Tempo* tempo, int startRow, int numRows)
304308
{
305309
for(auto seg = list->begin(), end = list->end(); seg != end; ++seg)
306310
{
307-
if(seg->row >= startRow)
311+
if(seg->row >= startRow && seg->row > 0)
308312
{
309313
seg->row += numRows;
310314
}

0 commit comments

Comments
 (0)