mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-01 03:29:03 +01:00
fix(editor): Ctrl+Z after a crossover laid along a curve leaves nothing behind, and such a crossover reaches from a transition onto the straight: the pieces the cut of the curve split off and then took out under a switch in the same step went into the history both as made and as taken out, so an undo retired them and brought them back, loose on top of the tracks put back (the curve seen chopped along its old path); now such a piece is neither, and push_track_snapshot drops a path that is both for every tool. The design of the grade line of the outer track, raised with the crossover, goes back with the undo as well (the step keeps the library of the designs), also when a crossover is moved or taken out for the route laid again. The frame a crossover along a curve is planned in goes on 250 m along the straights past the ends of the curve, and the release may fall on the straight of the other track: pressed near the end of the last transition and dragged towards the straight, its first switch ran past the end of the curve and the crossover was refused ("A switch of the connection runs off the end of its straight"); the first switch is drawn along that frame as it's dragged. The insert takes the style and the name of the track pressed on
This commit is contained in:
@@ -208,6 +208,9 @@ double const kLaySnapRadius{5.0};
|
||||
float const kSnapPixels{16.0f};
|
||||
double const kSwitchReach{6.0}; // a press farther from the selected track selects another one instead of placing the switch
|
||||
double const kSlipReach{12.0}; // m; a slip goes to the crossing nearest the cursor, if it's this close
|
||||
// m, of the straights past the ends of a curve a crossover laid along it reaches onto: from a transition it goes on onto the
|
||||
// straight after it
|
||||
double const kCrossoverStraights{250.0};
|
||||
double const kSkewSeat{2.0}; // m; the first point laid with Alt this close to a straight track goes onto its axis
|
||||
double const kSkewReach{30.0}; // m; Alt while laying turns the straight to a straight track this close to its start, or one it crosses
|
||||
double const kSkewRatios[]{4.8, 6.6, 7.5, 9.0, 12.0, 14.0, 18.5, 26.5};
|
||||
|
||||
Reference in New Issue
Block a user