@@ -143,11 +143,11 @@ void myFinishEdit(Tempo* tempo)
143
143
// ================================================================================================
144
144
// TempoManImpl :: apply segments.
145
145
146
- void myQueueSegments (const SegmentEdit& edit)
146
+ void myQueueSegments (const SegmentEdit& edit, bool clearRegion )
147
147
{
148
148
stopTweaking (false );
149
149
SegmentEditResult result;
150
- myTempo->segments ->prepareEdit (edit, result);
150
+ myTempo->segments ->prepareEdit (edit, result, clearRegion );
151
151
if (result.add .numSegments () + result.rem .numSegments () > 0 )
152
152
{
153
153
WriteStream stream;
@@ -259,7 +259,7 @@ void myWriteInsertRows(WriteStream& stream, Tempo* tempo, int startRow, int numR
259
259
}
260
260
}
261
261
}
262
- segs->prepareEdit (edit, result);
262
+ segs->prepareEdit (edit, result, true );
263
263
}
264
264
stream.write (tempo);
265
265
result.rem .encode (stream);
@@ -470,9 +470,14 @@ static double ClampAndRound(double val, double min, double max)
470
470
}
471
471
472
472
void modify (const SegmentEdit& edit)
473
+ {
474
+ modify (edit, true );
475
+ }
476
+
477
+ void modify (const SegmentEdit& edit, bool clearRegion)
473
478
{
474
479
stopTweaking (false );
475
- myQueueSegments (edit);
480
+ myQueueSegments (edit, clearRegion );
476
481
}
477
482
478
483
void removeSelectedSegments ()
@@ -591,7 +596,7 @@ void copyToClipboard()
591
596
}
592
597
}
593
598
594
- void pasteFromClipboard ()
599
+ void pasteFromClipboard (bool insert )
595
600
{
596
601
SegmentEdit clipboard;
597
602
@@ -616,7 +621,7 @@ void pasteFromClipboard()
616
621
}
617
622
618
623
// Add the pasted segments to the current tempo.
619
- modify (clipboard);
624
+ modify (clipboard, !insert );
620
625
}
621
626
622
627
// ================================================================================================
0 commit comments