mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-01 05:42:44 +01:00
fix(editor): laying leaves the terrain as it is: the track takes from the ground only the heights of the points clicked, from point to point by default, and no formation is led into the terrain after it, nor after a track dragged from a free end; the terrain made from the model never makes a chunk there is anew, made from the model or by hand, edited or not, only the missing ones, the formations laid anew as the tracks lie
The terrain under the tracks and the end of Tracks onto the terrain took every chunk along the tracks away and made it again from the model, the changes made by hand with them (79 chunks on test2). The heights while laying are kept under a key of their own, so the fitted ones chosen when they were the default are left behind; fitted stays a choice.
This commit is contained in:
@@ -116,7 +116,9 @@ bool editorSettings::load()
|
||||
m_top_rails = static_cast<std::uint32_t>(std::strtoul(value.c_str(), nullptr, 16)) | 0xff000000u;
|
||||
else if (key == "track_norms")
|
||||
m_norms = value == "free" ? track_norms::free_laying : value == "plk" ? track_norms::plk : track_norms::ask;
|
||||
else if (key == "lay_heights")
|
||||
// under a key of its own since the laying goes from point to point unless told otherwise: the fitted heights chosen
|
||||
// before, when they were the default, are left behind
|
||||
else if (key == "laying_heights")
|
||||
m_heights = value == "points" ? lay_heights::points : value == "level" ? lay_heights::level : lay_heights::fitted;
|
||||
else if (key.rfind(origin_prefix, 0) == 0)
|
||||
{
|
||||
@@ -167,7 +169,7 @@ bool editorSettings::save()
|
||||
stream << "top_tracks " << m_top_tracks << "\n";
|
||||
stream << "top_rails " << std::hex << (m_top_rails & 0xffffffu) << std::dec << "\n";
|
||||
stream << "track_norms " << (m_norms == track_norms::free_laying ? "free" : m_norms == track_norms::plk ? "plk" : "ask") << "\n";
|
||||
stream << "lay_heights " << (m_heights == lay_heights::points ? "points" : m_heights == lay_heights::level ? "level" : "fitted") << "\n";
|
||||
stream << "laying_heights " << (m_heights == lay_heights::points ? "points" : m_heights == lay_heights::level ? "level" : "fitted") << "\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