mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-01 03:29:03 +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:
@@ -110,6 +110,8 @@ bool editorSettings::load()
|
||||
m_track_tools_more = (value == "1");
|
||||
else if (key == "top_ballast")
|
||||
m_top_ballast = (value == "1");
|
||||
else if (key == "track_norms")
|
||||
m_norms = value == "free" ? track_norms::free_laying : value == "plk" ? track_norms::plk : track_norms::ask;
|
||||
else if (key.rfind(origin_prefix, 0) == 0)
|
||||
{
|
||||
// northing;easting
|
||||
@@ -157,6 +159,7 @@ bool editorSettings::save()
|
||||
stream << "terrain_offer " << (m_terrain_offer ? 1 : 0) << "\n";
|
||||
stream << "track_tools_all " << (m_track_tools_more ? 1 : 0) << "\n";
|
||||
stream << "top_ballast " << (m_top_ballast ? 1 : 0) << "\n";
|
||||
stream << "track_norms " << (m_norms == track_norms::free_laying ? "free" : m_norms == track_norms::plk ? "plk" : "ask") << "\n";
|
||||
stream << std::fixed << std::setprecision(3);
|
||||
for (auto const &origin : m_orthophoto_origins)
|
||||
stream << origin.first << " " << origin.second.first << ";" << origin.second.second << "\n";
|
||||
|
||||
Reference in New Issue
Block a user