Skip to content

Splice making room moves the flow's parameters along with the row #1547

Closed

Description

@ako

Symptom

A splice that makes room for an inserted fragment (create or modify, alter microflow … insert) moves the flow's parameters along with the row. On a PedApp copy (11.13), inserting one if/else into

create nanoflow MyFirstModule.NF_Do ($Flag: Boolean) returns Boolean as $Out …

moved $Flag from its derived position (200, 53) to (539, 53), and a longer replace after that moved it again to (699, 53). From then on describe prints @position(699, 53) on a parameter the script never placed, so the parameter row drifts further right with every insert.

Cause

mdl/backend/mfmutator/splice.go shift moves every top-level node past the cut, and a Microflows$MicroflowParameter is a top-level object of the unit's object collection.

Why the parameters should stay

A parameter is not on the line a fragment is spliced into; it belongs to the flow as a whole. Studio Pro authors draw it above the start event: measured on PedApp and JTSBootLogboek, 63 of 71 Studio Pro-authored parameters sit exactly at the start event's x, all of them above every other node, and none within 60px of the flow line. Leaving parameters out of the shift is what Studio Pro does when you insert an activity (nothing moves).

Fix

Leave Microflows$MicroflowParameter out of shift (and so out of pinnedPast, which shares its test). Found while fixing #1508 case 6 (PR #1546).

Activity

  1. added a commit that references this issue on Oct 22, 2026
  2. added a commit that references this issue on Oct 22, 2026
    9442043
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions