mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-01 22:07:55 +01:00
fix(editor): the answer Without terrain keeps to the scenery open, the settings stay as they were
nmt_decline_offer() turned off terrain_while_laying and terrain_model().area in the settings of the editor and saved them, so one Without terrain for a scratch scenery left the terrain off for every scenery opened later. The answer now holds for the scenery open only (nmt_state::declined, read through nmt_area()); the checkbox of the terrain panel shows it and, ticked, turns the terrain on again and keeps it in the settings. The nmtquestion self-test no longer writes the tester's settings, and fails the run if the answer changed them.
This commit is contained in:
@@ -617,7 +617,7 @@ void editor_mode::ground_sources(editor_orthophoto &Layer)
|
||||
return true;
|
||||
// asked for, the tile goes onto it once it comes; not where no terrain is to be made of the model, as after the answer without
|
||||
// terrain
|
||||
if (m_nmt.placed() && (m_nmt_state.grow || EditorSettings.terrain_model().area))
|
||||
if (m_nmt.placed() && (m_nmt_state.grow || nmt_area()))
|
||||
m_nmt.request({X - 1.0, Z - 1.0}, {X + 1.0, Z + 1.0});
|
||||
return false;
|
||||
});
|
||||
@@ -6274,7 +6274,7 @@ void editor_mode::render_ground_warning(tutorial_lesson const &Lesson)
|
||||
// over a panel the pointer is over no ground, and in a scenery laid without terrain no ground is to be there
|
||||
if (Lesson.action != tutorial_lesson::trial::lay || ui()->mode() != nodebank_panel::TRACK || ImGui::GetIO().WantCaptureMouse || false == ImGui::IsMousePosValid())
|
||||
return;
|
||||
auto const expected{m_streamer.resident() > 0 || ((m_nmt_state.grow || EditorSettings.terrain_model().area) && m_nmt.placed())};
|
||||
auto const expected{m_streamer.resident() > 0 || ((m_nmt_state.grow || nmt_area()) && m_nmt.placed())};
|
||||
if (expected && false == GfxRenderer->Mouse_Hit())
|
||||
ImGui::TextColored(ImVec4(1.0f, 0.7f, 0.2f, 1.0f), "%s", STR_C("There is no ground under the mouse: the track will lie flat at height 0. Real ground: F5"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user