17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-02 05:49:13 +01:00

feat(editor): the tracks are laid to the PKP PLK norms unless the free laying is chosen, asked as the laying starts

The free laying isn't the default any more. The first time a session opens the laying or the plan, a window asks how the
new tracks are laid, with the two cards of the panels (the norms marked as chosen); a click on one of them takes it and
closes the window, which comes before the offer of the terrain model of a new scenery. "Remember the choice, don't ask
again" keeps it in eu07_editor.ini (track_norms ask, free or plk), and a choice kept follows a later click on the cards of
the panels; the settings of the editor (General) choose between asking and either way. The self-test scripts start with the
free laying, as they were written for it.
This commit is contained in:
maj00r
2026-10-21 18:23:49 +02:00
parent 79642a95c7
commit 21595ba010
9 changed files with 100 additions and 5 deletions

View File

@@ -1336,9 +1336,15 @@ class editor_mode : public application_mode, private editor_track::observer, pri
std::vector<step> chain;
};
lay_tool m_lay;
bool m_norms_free{true};
bool m_norms_free{false};
// the choice between the free laying and the norms, asked once a session as the laying or the plan is opened first
bool m_norms_prompt{false};
bool m_norms_asked{false};
bool m_norms_remember{false};
alignment::limits laying_norms() const;
// returns: a card was clicked
bool render_norms_choice();
void render_norms_prompt();
void set_norms_free(bool const Free);
glm::dvec3 lay_angle_snap(glm::dvec3 const &Mouse, std::string &Label) const;
// the straight track Alt turns the laid straight to: the nearest one the straight from From to To crosses, or one along From