@@ -261,19 +261,40 @@ ApplicationWindow {
261261 id: columnVelocityInterpolationDialog
262262 anchors .centerIn : parent
263263 width: parent .width * Constants .defaultDialogScale
264- onAccepted: editorService .requestLinearVelocityInterpolationOnColumn (startLine (), endLine (), startValue (), endValue (), usePercentages ())
264+ onAccepted: {
265+ UiService .interpolationStartLine = startLine ();
266+ UiService .interpolationEndLine = endLine ();
267+ UiService .interpolationStartValue = startValue ();
268+ UiService .interpolationEndValue = endValue ();
269+ UiService .interpolationUsePercentages = usePercentages ();
270+ editorService .requestLinearVelocityInterpolationOnColumn (startLine (), endLine (), startValue (), endValue (), usePercentages ());
271+ }
265272 }
266273 InterpolationDialog {
267274 id: trackVelocityInterpolationDialog
268275 anchors .centerIn : parent
269276 width: parent .width * Constants .defaultDialogScale
270- onAccepted: editorService .requestLinearVelocityInterpolationOnTrack (startLine (), endLine (), startValue (), endValue (), usePercentages ())
277+ onAccepted: {
278+ UiService .interpolationStartLine = startLine ();
279+ UiService .interpolationEndLine = endLine ();
280+ UiService .interpolationStartValue = startValue ();
281+ UiService .interpolationEndValue = endValue ();
282+ UiService .interpolationUsePercentages = usePercentages ();
283+ editorService .requestLinearVelocityInterpolationOnTrack (startLine (), endLine (), startValue (), endValue (), usePercentages ());
284+ }
271285 }
272286 InterpolationDialog {
273287 id: selectionVelocityInterpolationDialog
274288 anchors .centerIn : parent
275289 width: parent .width * Constants .defaultDialogScale
276- onAccepted: editorService .requestLinearVelocityInterpolationOnSelection (startLine (), endLine (), startValue (), endValue (), usePercentages ())
290+ onAccepted: {
291+ UiService .interpolationStartLine = startLine ();
292+ UiService .interpolationEndLine = endLine ();
293+ UiService .interpolationStartValue = startValue ();
294+ UiService .interpolationEndValue = endValue ();
295+ UiService .interpolationUsePercentages = usePercentages ();
296+ editorService .requestLinearVelocityInterpolationOnSelection (startLine (), endLine (), startValue (), endValue (), usePercentages ());
297+ }
277298 }
278299 AddMidiCcAutomationDialog {
279300 id: addMidiCcAutomationDialog
@@ -419,26 +440,39 @@ ApplicationWindow {
419440 });
420441 UiService .columnVelocityInterpolationDialogRequested .connect (() => {
421442 columnVelocityInterpolationDialog .setTitle (qsTr (" Interpolate velocity" ));
422- columnVelocityInterpolationDialog .setStartLine (0 );
423- columnVelocityInterpolationDialog .setEndLine (editorService .currentLineCount - 1 );
424- columnVelocityInterpolationDialog .setStartValue (0 );
425- columnVelocityInterpolationDialog .setEndValue (100 );
443+ if (UiService .interpolationEndLine === 0 ) {
444+ UiService .interpolationEndLine = editorService .currentLineCount - 1 ;
445+ }
446+ columnVelocityInterpolationDialog .setStartLine (UiService .interpolationStartLine );
447+ columnVelocityInterpolationDialog .setEndLine (UiService .interpolationEndLine );
448+ columnVelocityInterpolationDialog .setStartValue (UiService .interpolationStartValue );
449+ columnVelocityInterpolationDialog .setEndValue (UiService .interpolationEndValue );
450+ columnVelocityInterpolationDialog .setUsePercentages (UiService .interpolationUsePercentages );
426451 columnVelocityInterpolationDialog .open ();
427452 });
428453 UiService .selectionVelocityInterpolationDialogRequested .connect (() => {
429454 selectionVelocityInterpolationDialog .setTitle (qsTr (" Interpolate velocity" ));
430- selectionVelocityInterpolationDialog .setStartLine (selectionService .minLine ());
431- selectionVelocityInterpolationDialog .setEndLine (selectionService .maxLine ());
432- selectionVelocityInterpolationDialog .setStartValue (0 );
433- selectionVelocityInterpolationDialog .setEndValue (100 );
455+ if (UiService .interpolationEndLine === 0 ) {
456+ UiService .interpolationStartLine = selectionService .minLine ();
457+ UiService .interpolationEndLine = selectionService .maxLine ();
458+ }
459+ selectionVelocityInterpolationDialog .setStartLine (UiService .interpolationStartLine );
460+ selectionVelocityInterpolationDialog .setEndLine (UiService .interpolationEndLine );
461+ selectionVelocityInterpolationDialog .setStartValue (UiService .interpolationStartValue );
462+ selectionVelocityInterpolationDialog .setEndValue (UiService .interpolationEndValue );
463+ selectionVelocityInterpolationDialog .setUsePercentages (UiService .interpolationUsePercentages );
434464 selectionVelocityInterpolationDialog .open ();
435465 });
436466 UiService .trackVelocityInterpolationDialogRequested .connect (() => {
437467 trackVelocityInterpolationDialog .setTitle (qsTr (" Interpolate velocity" ));
438- trackVelocityInterpolationDialog .setStartLine (0 );
439- trackVelocityInterpolationDialog .setEndLine (editorService .currentLineCount - 1 );
440- trackVelocityInterpolationDialog .setStartValue (0 );
441- trackVelocityInterpolationDialog .setEndValue (100 );
468+ if (UiService .interpolationEndLine === 0 ) {
469+ UiService .interpolationEndLine = editorService .currentLineCount - 1 ;
470+ }
471+ trackVelocityInterpolationDialog .setStartLine (UiService .interpolationStartLine );
472+ trackVelocityInterpolationDialog .setEndLine (UiService .interpolationEndLine );
473+ trackVelocityInterpolationDialog .setStartValue (UiService .interpolationStartValue );
474+ trackVelocityInterpolationDialog .setEndValue (UiService .interpolationEndValue );
475+ trackVelocityInterpolationDialog .setUsePercentages (UiService .interpolationUsePercentages );
442476 trackVelocityInterpolationDialog .open ();
443477 });
444478 UiService .lineDelayDialogRequested .connect (() => {
0 commit comments