18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 04:47:06 +01:00
Commit Graph

14 Commits

Author SHA1 Message Date
maj00r 2217da8648 Merge ui/editor-consistency into ui/editor-lay-flow
# Conflicts:
#	application/editormodeselftestexpect.cpp
2026-11-24 18:55:28 +01:00
maj00r f53cb24c6e Merge feat/editor-project-file into ui/editor-consistency
# Conflicts:
#	application/editormodeselftestexpect.cpp
2026-11-24 18:54:50 +01:00
maj00r 44d94ae3d3 fix(editor): the answer Without terrain keeps to the scenery open, the settings stay as they were
nmt_decline_offer() turned off terrain_while_laying and terrain_model().area in the settings of the editor and saved them, so
one Without terrain for a scratch scenery left the terrain off for every scenery opened later. The answer now holds for the
scenery open only (nmt_state::declined, read through nmt_area()); the checkbox of the terrain panel shows it and, ticked, turns
the terrain on again and keeps it in the settings. The nmtquestion self-test no longer writes the tester's settings, and fails
the run if the answer changed them.
2026-11-24 18:49:59 +01:00
maj00r 47995b9ae2 Merge lang/editor-track-pl into ui/editor-first-steps
# Conflicts:
#	application/editormodeselftestexpect.cpp
2026-11-24 18:48:52 +01:00
maj00r 001dd0439a Merge test/editor-track-golden into feat/editor-norms
# Conflicts:
#	application/editormodeselftestexpect.cpp
2026-11-24 18:35:42 +01:00
maj00r 0de04dceed Merge ui/editor-track-panels into fix/editor-switch-rules
# Conflicts:
#	application/editormodeselftestexpect.cpp
2026-11-24 18:34:44 +01:00
maj00r 65e4870318 test(editor): a mistyped track fails the self-test, indented comments are skipped, case 7b checks the switch got bent
- A blank line or an indented `#` comment in a script is no longer a command no group takes.
- `trackcant`, `routegauge` and `tracksetdelete` with a track that isn't there count as a failed expectation.
- `expect shaped <switch> <yes|no>`: 7b checks that the gizmo drag bent the switch out of its record before deleting it.
- The ramp-length loop of test_alignment counts in an integer (Sonar S2193).
2026-11-24 18:34:25 +01:00
maj00r 81e53bbdef feat(editor): the switch tool a step at a time, the template chosen as a line
The panel of the switch tool goes by states as the lay tool's does, each with its step at the top
(editor-lay-flow.md, second part):

- Ready: "Press on a straight and drag along it and to the side" (a slip, a crossing and a connection with
  steps of their own). What to place as one bar, [Switch | Slip | Crossing], in place of the tiles in two
  rows. The rail of the track, or the rails [60E1 49E1 S42] where it doesn't tell its rail, and the speed on
  the diverging track as chips beside "Diverging speed (km/h)"; the template they pick as one line,
  "Rz 60E1-300-1:9, 50 km/h", its tooltip the lengths and the rest of its label, a pencil at its end opening
  the list of the templates and All templates under it. The gestures of placing are in the card and in the
  bar under the view, no longer rows in the panel; the template editor among More settings.
- Dragging: "Let go to insert" and one line, "27.1 m, left, 40 km/h"; what keeps the switch from being laid
  (the rules a switch bent into a curve or laid on from a free end breaks) in one line in red, the switch
  moved back onto its straight or into its curve and the branch that doesn't fit into a track in orange.
- Placed: "Switch z1 inserted, Ctrl+Z undoes" while the switch is the one the last step of the history laid,
  else "Switch z1: drag it along its track to move it". The sketch, its length and side in its tooltip; the
  speed chips and the template as the line with the pencil, as when placing; Flip the side. A switch with no
  drive says so with what puts one there; the name, the record, the angle, the drive, the frog and the check
  rails, the slide along its track and the note of the inspector are under Details, folded. What the tool
  told of it besides the step under it all.
- Refused: the reason in red right under the step, the rest of a long one in its tooltip.

The drive of the switch is drawn by a function of its own (render_switch_drive), no longer a lambda of the
panel. The status of the switch tool is told in red while it's the refusal last told
(m_switch.refusal), the expectations of the self-tests read it as before. The bar under the view keeps
the gestures of the view first, "List in the panel" after them.

Self-test: expect switchpanel <ready|dragging|placed|selected>, and the case lf_2_switch_panel_states:
ready after a switch refused, placed after one laid, selected after another one laid since.

lang/editor_pl.po: the Polish of the new texts.
2026-11-23 13:59:37 +01:00
maj00r f065098717 feat(editor): the lay tool a step at a time, its settings folded while the points are clicked
While the points of a line were clicked, the same things were told in four places at once: the card of the
tool with seven gestures, the panel (the points not laid, the buttons, the modes with their explanation,
the speed with its chips, the height, the curves with their legend), six lines by the cursor with the full
texts of the norms, and the gestures again in the bar under the view. The panel of the lay tool now goes by
states, each with one line of what to do now at its top (editor-lay-flow.md):

- Ready, nothing clicked: "Click on the ground or at a free end of a track" (with a curve traced: "Click
  points along the curve on the photo"), and the three settings: the shape [Straights | Curve], with what it
  makes of the points under the "?" beside it (a click opens its lesson), the radii of a curve traced in the
  same place, the speed (the field and its chips), the height [Fitted | Point to point | Flat]. The rest
  under More settings, the pieces added at the free end of the selected track there too.
- Clicking, a point or more: "Click the next bends" and the keys "Enter lays, Backspace takes back a point,
  Esc drops". The line in one line, "Length 300 m, 2 curves, slowest 35 km/h", and a badge, green "meets the
  norms" or orange "2 curves below the norms for 100 km/h"; "details" (or the badge) opens the curves one by
  one, the breaches of the norms in their words, how the curves go on from those of the tracks joined, the
  speed designed for, the grades and what the norms say where the line goes on from a switch. The legend of
  the labels is by the cursor over a curve. [Lay (Enter)] as the main button and [Drop]. The settings
  folded to one line, "Straights, 100 km/h, through the points" (a curve traced with its radii), a pencil at
  its end opening them. The details open under it all, so the buttons stay where they are.
- Laid: back to ready, with one line over the settings, "Laid 214 m (14 tracks), Ctrl+Z undoes" in green,
  the rest of what the laying told under "notes" beside it. It goes as the history moves on or back.
- Dragged out of a free end: "Drag to lay from the end; let go to lay it", the line of its length and
  radius with the badge, the settings as the line of their summary. The drag tells the line laid as Enter
  does.
- By the cursor, the leg drawn to it in a line or two: "straight 40 m", "curve R 76 m, up to 35 km/h" with
  the sign of a warning (drawn, the font has no glyph of it) and the line in orange where it's below the
  norms; joining a free end, the shape of the join, a line that can't be laid, Alt, the first Esc and what
  Tab switched to. The texts of the norms are in the details only.
- The labels in the view short: "R 198, up to 60 km/h", orange below the norms; the straights as before.
- The bar under the view shows the three gestures of the state: ready "LMB the first point, LMB on a free
  end from the end, Tab a curve from the photo"; clicking "LMB the next bend, Enter lay, Backspace take
  back". The rest of them in the card unfolded and in F1, Ctrl+Shift+wheel (the speed) added there; the
  length typed after the three.

Nothing is taken away: what the panel showed is behind a fold, the pencil, the "?" or F1. The messages the
lay tool logs for the self-tests keep their words, the line laid told as "Laid 214 m (14 tracks)" now.

The flow: application/editorflow.h, the step line, the summary line with its pencil, the badge with its
details, the message of one line with the rest in its tooltip, for the panels of other tools as well.

Self-test: expect laypanel <ready|clicking|laid|extending> <shown|folded>, and the case lf_1_lay_panel_states
through the states, in straights and in a curve traced.

lang/editor_pl.po: the Polish of the new texts as the spec words them; the laying texts of "the photo"
named the orthophoto as the rest of the editor ("na ortofotomapie", "z ortofotomapy").
2026-11-23 13:59:37 +01:00
maj00r fef7eaac11 feat(editor): one card for the tools, one layout of the fields, windows of their own, one name for each thing
The consistency pass of the editor's interface after its first steps (P2 of the plan of the editor's interface):

- One card for the tool in use in every field of work. The card of the track tools (its icon, name, family and key, what
  the tool is for, the mouse and the keys drawing its gestures, the link to all the shortcuts) is a component of its own,
  render_tool_card, fed by the tracks as before and now by the surroundings, the roads and the terrain: their tools, kept in
  one table each with their icons, keys, tooltips and gestures for the toolbar and the card, had a plain heading and a line
  of keys or a few rows of gestures there. The tool options of the surroundings are headed by the field of work as the
  others are. The card is folded to its title row unless the user opened it, for all the tools: what the tool is for shows
  over the title, a click opens the gestures, which are in the strip under the view of the tracks as well. Kept with the
  settings of the editor under the key tool_card_folded, so the open card the tracks had by default before stays behind.
- One layout of the fields: the name on the left, the field on the right (begin_fields and field_row, as in the inspector of
  the tracks) in the inspector of the surroundings (the name, the position, the rotation, the scale), Weather and time,
  Change history, the settings of the orthophoto and the settings of the editor. The square buttons of the download area go
  on to the next line at the edge, the last one was cut off.
- Windows of their own, which don't hide the inspector: Editor settings, Weather and time and the orthophoto settings float
  over the view, opened in its top left corner below the rows of the tools and kept between them and the status line, as
  the window of a lesson is. They were tabs over the inspector, and the orthophoto settings unfolded inside the layers; Map >
  Orthophoto settings..., the button of the terrain tools and the button in the layers open the window now.
- One list of the objects of the scenery: Windows > Scene Hierarchy, a plain list of the same nodes, is gone; Windows >
  Scene opens the Scene tab (by layer and group, with the filter) and brings it forward when it lies behind the layers.
- One name for each thing, in the menus, the toolbar, the panels, the tutorial and F1: the orthophoto ("Ortofotomapa
  (zdjęcia lotnicze z geoportal.gov.pl)" where it's introduced, "ortofotomapa" in the rest, for "zdjęcia lotnicze",
  "ortofoto" and "zdjęcie"), the terrain model ("Teren z map (NMT)" for "Prawdziwy teren z map", "model terenu", "prawdziwy
  teren", "Teren z NMT"), the plan tool ("Plan", the lesson "Correcting a curve" and the section of F1 "Plan of a curve"
  before), the area fill (the terrain's "Fill" is "Area fill" as in the surroundings, with the icon of it, Water without).
  The texts of the laying, whose panel is to be redone, are left as they are.
- The node bank: a model clicked with the select tool of the surroundings arms the insert tool with it (the click did
  nothing before), the random model of a set is left off then. A model inserted where there's no ground under the cursor
  stands at the height 0 where the cursor points, or in front of the camera when it points above the horizon, and the
  status says where; it stood at the point the renderer last had under the cursor, out of sight. The search field of the
  bank has no name beside it, which was cut to its first letter.
- The settings in one place: Editor settings holds the movement and the speed of the camera (as View > Camera speed), the
  gizmo and the colours, the terrain made of the terrain model by itself (as in the layers and the download area) and the
  maximum placement distance (as in Change history).
- F1 and the menus: Esc closes the window of the shortcuts, before anything else; the window stays in the work area as the
  window of a lesson; the menus are opaque, the windows under them showed through.
- What the first steps left: with an empty scenery the panel in the middle of the view gives way to the inspector, which
  says the same with the button of the lay tool and the first steps; it's drawn only while the inspector isn't seen. A
  switch whose speed limits its diverging track alone shows that speed under its empty speed field ("The diverging track
  40 km/h, the main one no limit"), read only; the field alone said no limit.
- Self-tests: the command bankpick, the expectations tool, window and selected, the cases c_1_bank_card_arms_insert and
  c_2_esc_closes_shortcuts.

lang/editor_pl.po: the Polish of the new texts (the cards of the tools, the windows, the fields, the notices), the entries of
the texts renamed given their new English, those no longer used taken out, and the names unified in the Polish of the
orthophoto and of the terrain model.
2026-11-23 13:35:56 +01:00
maj00r cd20d8ec94 feat(editor): the first steps in the inspector, one way to start, the line laid summed up
The first steps of the editor, after the first-run pass at 1920x1080 and 1366x768 (P1 of the plan of the
editor's interface):

- The tutorial no longer opens by itself as a window over the middle of the view (at 1366x768 over all
  of it, its close button under the tool row). With nothing selected, the inspector shows a compact
  "First steps" card: the lesson of the tool in use, its steps to try ticked as they're reached, the
  links "Show the lesson", "The camera" (the first lesson) and "Hide" (the setting first_steps, which
  the checkbox of the window now names "Show the first steps in the inspector"). Opened, the window of
  the lesson goes into the corner of the view by the inspector, below the rows of the menu and the
  tools; moved, it stays between them and the status line, as high as that room at most, the lesson
  scrolled inside. Its close button is always within reach.
- The lesson follows the tool: the select tool of Tracks opens "Laying track" until its steps are done,
  so a new scenery opened in Tracks starts there, not with the camera, which stays the first page and a
  link of the card.
- An empty scenery in Tracks with nothing selected: "The scenery has no tracks yet" and one highlighted
  button, "Lay the first track (L)"; the tutorial is the card under it, a "Tutorial" link when the card
  is hidden. With tracks, the select tool keeps its hints and a plain "Lay a track (L)".
- "Without terrain", the answer to the question of the terrain at the first L, turns off the terrain
  made of the terrain model by itself: under the tracks as they're laid (the checkbox of the layers) and
  around the camera within the download area (the checkbox of the terrain panel), stops putting the
  squares of the area into the cache, a square on its way giving way at once, and drops the squares
  waiting. Kept on, the model went on being asked for, and offline the log filled with "NMT square ...
  not fetched: WinHTTP error"; now nothing is asked for after the answer.
  "Load the terrain" turns both on again. The squares of the area go to the cache, and the aerial photos
  ask for the model to lie on, only while some terrain is made of the model by itself. The question
  stands in the middle of the view, the window of the lesson waiting meanwhile. The warning of no ground
  under the mouse shows only while the pointer is over the view and the terrain is to be there.
- The tooltip of the line being laid names the panel the rest of its warnings are in ("listed in the
  tool options"): the translation of the text before said "in the panel on the right", the panel is on
  the left.
- While the pointer is over a panel, the line being laid stays as it was: the point of the cursor, the
  free end it snaps to and its height aren't taken from where the pointer is under the panel, which
  added a leg there with curves and warnings of its own. A drag begun in the view goes on over a panel.
- After Enter the inspector sums up the line laid: its tracks, length and curves, those below the norms
  in orange, and what comes next, "A switch (T)" and "Save (Ctrl+S)". It stays while the last track is
  the selection the laying left; a click on a track shows the sheet of that track. The switch tool with
  nothing clicked shows the same, not the sheet of the last track laid.
- A switch the switch tool refuses is told in its panel and by the cursor, no longer in the status line
  and the layers window as well, where it stayed after the next switch was laid. Why a branch couldn't
  lead into a free end goes into the panel with the rest; a switch laid takes the note by the cursor
  away.
- The panel of the lay tool fits one screen at 1366x768: what the tool is for is the tooltip of the
  title of its card, the paragraph of the radius at the bends the tooltip of its "?" (which still opens
  the lesson), "This speed also on from a track with a speed of its own" is under More settings; the
  mode, the speed and the height stay up front.
- The layout made on the first start: the side columns 22% of the width, at least 300 px, at most the
  400 and 460 px they had and 30%; at 1366 px the view has about 766 px instead of 557. The tool options
  take 60% of the left column, and in a window under 800 px high the layers are a tab beside them, the
  tool options shown, so the panel of a tool has the whole column. The line of the keys of the
  surroundings goes on under itself at the edge of the panel. Layouts kept in imgui.ini are left as they
  are.
- The names of the period of the day, the season and the weather in Weather and time, and the type of a
  node in the inspector of the surroundings, go through the translations ("(day)", "(autumn)",
  "(scattered)", "Typ: track" before). The degree sign of the air temperature is written as its UTF-8
  bytes: CMakeLists.txt sets COMPILE_OPTIONS of eu07 and eu07_core after add_compile_options("/utf-8"),
  which drops /utf-8, so MSVC writes the "°" of a literal as the single byte 0xB0 of the ANSI code page,
  not UTF-8, and ImGui drew '?'.
- Self-tests: the expectations statuslacks, refusal, statusline, laycursor and terrain, the command
  nmtquestion, and the cases fs_1_preview_over_panel, fs_2_switch_refusal_cleared and
  fs_3_without_terrain.

lang/editor_pl.po: the Polish of the new texts (the card of the first steps, the summary of the line laid,
"Lay the first track", the names of the periods, seasons and weathers and of the node types), the entries
of the texts replaced given their new English ("Show the first steps in the inspector", "and %zu more,
listed in the tool options", "Lay the first track  (L)" in place of "Or start with:"), and "(do
transmisji)" in place of the English "(stream)" of the drawn cursor.
2026-11-23 12:09:59 +01:00
maj00r 38f90387c4 feat(editor): the norms checked on the tracks laid, read only: a Norms tab of the track analysis and its report
The second half of E1: what the tracks of a scenery are against a profile of the norms, listed. Nothing of the tracks is changed.

- editor/editorNormsReport: a line of paths sampled a metre apart, two samples at each joint, into what the norms read a line
  from: the plan, the curvature signed by the turn, the cant on the base of 1500 mm (as the simulator takes the rolls) signed by
  the side it leans to as the line runs, the grade, the speed of each path (a switch's for its diverging track alone too), and
  what the path is a part of (a switch, its diverging track, a curved switch, a movable frog, a crossing). The line described,
  checked, and each finding set back on its path with a point of it; its message, "cant ramp 3.00 mm/m, PLK allows at most 2.50 mm/m
  (tab. 9.12)", "break of the grade with no vertical curve, PLK asks for a radius of at least 2500 m (tab. 10.2)", through STR_C;
  the text of the report: the class, the elements, the cant, the grade line and the findings of each line.
- The Norms tab of the track window, under More beside Speed and Joints, no key; its window is ###trackanalysis, as theirs. The
  line through the selected path (run_route, as the speed check walks it) or the whole scenery: the lines through the plain tracks,
  then each path of a switch none of them ran along, checked with the line it lies in and its own findings kept, a place two lines
  run through listed once. The profile (PLK by default) and the class of the line folded under a line saying it: the line speed for
  the tracks with none of their own (on by default: the speed of each track), the slow trains (tab. 8.1 by default), the traffic,
  main track or siding, the load, at a platform. The results in the table of the speed check and the joints, the worst first,
  coloured by the tier, the values above the recommended ones on a tick; a click on a row shows the place, the hard limits and the
  warnings are marked in the view. The icon is drawn into its own cell of editor_icons.png only (the generator has it): the sheet
  drawn again with this Pillow differs in other cells.
- Self-test: normsreport <file> [scope] [plk|tsi|en|ch] [km/h] writes the report to the file; expect findings <tier> <least> <most>;
  the case e1_norms_report checks the curves k0..k3 of the fixture at 60 km/h against PLK and the whole scenery against the TSI.
- Golden: data/norms/line.scn, a line of 14 tracks written by make_line.py there (curves with and without transitions, cant on and
  off a curve and along a straight, reverse curves 10 m apart, short straights, a grade with breaks), and its report against the
  four profiles in data/norms/line_report.txt; EU07_UNIT_TESTS_UPDATE_GOLDEN=1 writes it anew. A test lays a canted corner with the
  alignment of the editor and finds the samples leaning into it, both turns and run both ways, I = Deq - D.

alignment::limits stays as the laying tools use it. Where its values differ from PLK P0:
- unbalanced 0.6 m/s2 is I 92 mm on the 1500 mm base; P0 110 mm (P1 130) on the running lines, 80 on the sidings;
- ramp_factor 10, a ramp of 1:(10 V), 1 mm/m at 100 km/h and 2.5 mm/m at 40 km/h, has no counterpart: P0 1.6 mm/m at any speed;
- jerk 0.3 m/s3 is dI/dt 46 mm/s; P0 55 mm/s;
- vertical_factor 0.4 V^2 and vertical_min 2000 m; P0 max(0.77 V^2, 5000 m) (P1 max(0.35 V^2, 5000), P2 max(0.25 V^2, 2000));
- arc_min 20 m and arc_min_factor 0.4 V; P0 max(0.35 V, 30 m) up to 120 km/h, 0.40 V up to 200 km/h, also for the straights, where
  tangent_min_time is 0;
- the same: cant_max 150 mm (P0 = P1 = P2 on ballast), cant_rate 35 mm/s (P0 of tab. 9.13), the base of 1500 mm.
2026-11-23 10:28:27 +01:00
maj00r c7afa3ca10 fix(editor): a switch laid gets the speed of its diverging track, one breaking a hard rule of ST-T1-A6 isn't laid
- Every switch laid writes the speed of its diverging track (`velocity`): the switch tool on a
  straight, into a curve, from a free end and linked, a double switch, the switches of a slip, a
  switch given another template of the catalogue, and a switch moved along the curve it's bent
  into. A switch of the catalogue had no limit before, one copied from a switch of the scenery kept
  that one's, one laid without a track had the laying speed on both its tracks. The limit is for the
  diverging track alone (`velocity -V`); the own limit of the track it goes into stays for both
  where it's the lower. The switch tool says the speed and what gives it.
- The speed is formula 9.9 of PKP PLK ST-T1-A6 the other way round, V = sqrt((I + D) r / 11.8), with
  the normal cant deficiency of the frog of table 9.7 (110 mm a fixed frog, 130 mm a movable nose),
  rounded down to the steps of the speed limits and no more than table 11.2 gives the basic switch.
  For the fixed frogs the formula gives table 11.2 itself (190 40, 300 50, 500 60, 760 80, 1200
  100 km/h); the 2500-1:26.5 with a movable nose stays 130. A switch bent into a curve takes the
  radius of its diverging track from table 11.8 (one-sided r" = (Rr - t^2)/(R + r), two-sided
  (Rr + t^2)/(R - r)) and the cant of the line with its sign: leaning against the diverging track it
  takes speed away, where the speed check counted it as helping. Rz 60E1-190-1:9 bent out of the
  curve R 600 m with 60 mm: 30 km/h, not 40; the 60E1-500-1:12 of the review, out of R 1200 m with
  60 mm: 60 km/h at its fixed frog (54 at I = 100 mm, the 0.65 m/s2 the editor took), not 107.
- A switch breaking a hard rule isn't laid, the tracks left as they were, and the switch tool says
  why, with the value, the limit and the paragraph: the cant changing within it (11.4 pkt 7), a cant
  ramp ending within it or nearer than 6 m (9.6 pkt 16-17; one ending right at an end of the switch
  is let be, as the snapping of the start offers it), a double switch, a slip or a crossing bent
  (11.4 pkt 4), the curvature of its diverging or its main track turning from one side to the other
  (9.7 pkt 12, KZW II). They were warnings shown after the switch was laid, and on a straight the
  cant wasn't looked at at all. The line is looked at 10 m past the ends of the curve or the
  straight too, so the ramp on the straight before a curve counts. The previews show the refusals.
- A switch moved along its straight or the curve it's bent into, a double switch moved along its
  straight, and a switch given another template go through the same checks; one breaking a rule
  stays as it is.
- Warnings still: 1:9.403 and steeper than 1:9 bent (11.4 pkt 4c-d), a rule of the running and the
  main tracks, which the editor doesn't tell from the side ones, as the warning now says; the limits
  of table 11.9 and a cant over 100 mm in a bent switch (table 9.6), as before.

Tests: unit tests of tables 11.8 and 11.9 (the least main radius bends the diverging track to the
least radius the table gives), table 9.7, the speeds of table 11.2 by formula 9.9, the speed of a
bent switch with the cant with its sign (the example of the review), the cant over a switch on a
straight and a double switch bent. Editor cases `q2_1_switch_speed`, `q2_2_switch_refusals` and
`q2_3_switch_move`, with `expect status` (the status of the switch tool) and `expect steps` (the
undo steps), the fixture with a straight taking a cant on and a compound curve without cant. All
pass; with the changes of the editor reverted all three fail.
2026-11-23 09:09:01 +01:00
maj00r 690c913ef0 test(editor): self-test scripts that fail, a runner, and a case for each fix of the track editing
The editor's self-test scripts only logged: nothing made a run fail. Now:

- `expect` commands check the state and log `SELFTEST PASS` or `SELFTEST FAIL ... got X, expected Y`:
  the cant at a track end, the joint at an end (gap, angle, cant step), the records of a switch and
  the connections naming it, speed, gauge, a track present or removed, the laying norms' gauge,
  heights and lifts against a mark, whether a track is in the line under the route tool, and the
  includes of a turntable. A command no group takes counts as a failure, so a mistyped one can't
  make the checks after it pass.
- At `quit` the result is logged, and a script whose expectations failed ends the editor with exit
  code 2 (a failed start stays 1; the simulator's test mode is unchanged).
- The commit of the inspector's cant field is `track_cant_commit`, which the inspector and the
  `trackcant` command both call; `routegauge` sets the laying norms as the route tool does, and
  `tracksetdelete` deletes a set of tracks by name.
- `tests/editor/run.py` runs each script of `tests/editor/cases` on a copy of the fixture scenery
  in the game folder, with a wall-time limit and a memory cap, reads the exit code and the
  `SELFTEST` lines, and deletes the copy. A `#> reopen` line restarts the editor on the saved
  scenery. See `tests/editor/README.md`.
- One case per fix of the track editing quick fixes (inspector cant, norms after deleting, the
  gauge paste group, turntable speed saved, deleting a set, a set with a double switch, a slip
  and a crossover, deleting a switch of a crossover, a bent switch). All pass; with the fixes
  reverted all fail.
2026-11-23 03:31:57 +01:00