@@ -262,8 +262,6 @@ ApplicationWindow {
262262 anchors .centerIn : parent
263263 width: parent .width * Constants .defaultDialogScale
264264 onAccepted: {
265- UiService .interpolationStartLine = startLine ();
266- UiService .interpolationEndLine = endLine ();
267265 UiService .interpolationStartValue = startValue ();
268266 UiService .interpolationEndValue = endValue ();
269267 UiService .interpolationUsePercentages = usePercentages ();
@@ -288,8 +286,6 @@ ApplicationWindow {
288286 anchors .centerIn : parent
289287 width: parent .width * Constants .defaultDialogScale
290288 onAccepted: {
291- UiService .interpolationStartLine = startLine ();
292- UiService .interpolationEndLine = endLine ();
293289 UiService .interpolationStartValue = startValue ();
294290 UiService .interpolationEndValue = endValue ();
295291 UiService .interpolationUsePercentages = usePercentages ();
@@ -440,36 +436,26 @@ ApplicationWindow {
440436 });
441437 UiService .columnVelocityInterpolationDialogRequested .connect (() => {
442438 columnVelocityInterpolationDialog .setTitle (qsTr (" Interpolate velocity" ));
443- if (UiService .interpolationEndLine === 0 ) {
444- UiService .interpolationEndLine = editorService .currentLineCount - 1 ;
445- }
446- columnVelocityInterpolationDialog .setStartLine (UiService .interpolationStartLine );
447- columnVelocityInterpolationDialog .setEndLine (UiService .interpolationEndLine );
439+ columnVelocityInterpolationDialog .setStartLine (0 );
440+ columnVelocityInterpolationDialog .setEndLine (editorService .currentLineCount - 1 );
448441 columnVelocityInterpolationDialog .setStartValue (UiService .interpolationStartValue );
449442 columnVelocityInterpolationDialog .setEndValue (UiService .interpolationEndValue );
450443 columnVelocityInterpolationDialog .setUsePercentages (UiService .interpolationUsePercentages );
451444 columnVelocityInterpolationDialog .open ();
452445 });
453446 UiService .selectionVelocityInterpolationDialogRequested .connect (() => {
454447 selectionVelocityInterpolationDialog .setTitle (qsTr (" Interpolate velocity" ));
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 );
448+ selectionVelocityInterpolationDialog .setStartLine (selectionService .minLine ());
449+ selectionVelocityInterpolationDialog .setEndLine (selectionService .maxLine ());
461450 selectionVelocityInterpolationDialog .setStartValue (UiService .interpolationStartValue );
462451 selectionVelocityInterpolationDialog .setEndValue (UiService .interpolationEndValue );
463452 selectionVelocityInterpolationDialog .setUsePercentages (UiService .interpolationUsePercentages );
464453 selectionVelocityInterpolationDialog .open ();
465454 });
466455 UiService .trackVelocityInterpolationDialogRequested .connect (() => {
467456 trackVelocityInterpolationDialog .setTitle (qsTr (" Interpolate velocity" ));
468- if (UiService .interpolationEndLine === 0 ) {
469- UiService .interpolationEndLine = editorService .currentLineCount - 1 ;
470- }
471457 trackVelocityInterpolationDialog .setStartLine (UiService .interpolationStartLine );
472- trackVelocityInterpolationDialog .setEndLine (UiService .interpolationEndLine );
458+ trackVelocityInterpolationDialog .setEndLine (UiService .interpolationEndLine === 0 ? editorService . currentLineCount - 1 : UiService . interpolationEndLine );
473459 trackVelocityInterpolationDialog .setStartValue (UiService .interpolationStartValue );
474460 trackVelocityInterpolationDialog .setEndValue (UiService .interpolationEndValue );
475461 trackVelocityInterpolationDialog .setUsePercentages (UiService .interpolationUsePercentages );
0 commit comments