18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-02 02:42:46 +01:00

fix(editor): a Plan apply is one step to undo, the setting of the model is taken when the scenery is opened, tracks taken away by hand are a change by hand

- The commands of one Plan apply after the first are joined to it: one Ctrl+Z takes back the whole apply, none leaves the line half
  edited.
- The setting "Editing on the model" is taken when the scenery is opened and kept for the session; changed meanwhile, the panel says it
  takes effect with the next scenery. Turned on later, an edit made the old way before was written back as the file had it; turned off
  before a save, the scenery was saved without its project.
- A line of the model some of whose tracks another tool took away (a switch put in) counts as changed by hand, as it does after a
  reopen: each track knows how many tracks its line was made of.
- A self-test which doesn't set the model leaves it off, whatever the tester's own eu07_editor.ini has.
- What the generator can't make as the line has it is told with the notices of the command, not only logged.
This commit is contained in:
maj00r
2026-11-29 22:35:57 +01:00
parent 3cfdaefe5e
commit 5588821bfa
4 changed files with 81 additions and 10 deletions
+3
View File
@@ -1877,6 +1877,9 @@ void editor_mode::render_settings()
ImGui::SetTooltip("%s", STR_C("A line laid in the straights, or applied by the route design, becomes a line of the model of the track geometry: its tracks are made by the model, "
"its edits checked against the norms and refused with the reasons, the project of the map kept next to it.\n"
"The tracks there were stay as they are, edited the old way. Off, the editor works as it did"));
// taken when a scenery is opened: changed meanwhile, the model and the scene would go out of step
if (model != model_taken())
ImGui::TextDisabled("%s", STR_C("Takes effect with the next scenery opened"));
if (auto const error{model_error()}; model && false == error.empty())
ImGui::TextColored(ImVec4(1.0f, 0.6f, 0.2f, 1.0f), "%s", format(STR_C("The project of the map can't be opened: %s"), error.c_str()).c_str());
}