17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-31 19:19:03 +01:00

fix(editor): the records of the stations, the switches, the alignments and the kilometrage stay out of a _ter.scm too, as out of a .txtf: with the .sbt of the scenery the file loads as terrain, isn't written back and the changes kept there were lost

This commit is contained in:
maj00r
2026-10-22 16:06:37 +02:00
parent 2452c1cd0d
commit ad0a7e7d62
3 changed files with 10 additions and 8 deletions

View File

@@ -13,6 +13,7 @@ http://mozilla.org/MPL/2.0/.
#include "application/editormodeshared.h"
#include "application/editorprojection.h"
#include "application/editoruilayer.h"
#include "editor/editorAlignmentStore.hpp"
#include "editor/editorFormat.hpp"
#include "editor/editorGeometry.hpp"
#include "editor/editorIncludeInfo.hpp"
@@ -360,11 +361,7 @@ srk_tool::record &srk_tool::record_of_open()
auto *first{m_layout->switches.front()};
entry.anchor = first->name();
entry.track = first;
entry.layer = scene::Layers.resolve(first->layer());
if (false == scene::Layers.valid(entry.layer) || false == scene::Layers.accepts(entry.layer))
entry.layer = scene::Layers.active();
if (false == scene::Layers.valid(entry.layer))
entry.layer = 1;
entry.layer = alignment_store::layer_of(*first);
m_records.push_back(std::move(entry));
m_record = static_cast<int>(m_records.size()) - 1;
m_anchor = first;