18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-21 06:14:58 +01:00

fix(editor): Fields: a separate field is built after loading with the camera still; a cleared outline or another field chosen forgets the one to outline again; giving back a field keeps the holes of the others over it

- waits_for_ground counts a chunk as still coming while its pack isn't read
  yet (right after opening the scenery none is), and as not coming only when
  the pack is missing or read without that chunk. Before, the first build
  after opening left a saved separate field a hole until the camera moved.
- Clear the outline (Fields and the area fill) and choosing another field in
  the list forget the field put back by Outline it again, so the next cut is
  a new field and not the old one moved.
- All holes of separate fields share one mark, so closing one closed it under
  an overlapping field too; the separate fields left over the closed outline
  are cut again after it (when a field is given back or outlined again).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ
This commit is contained in:
Claude
2026-11-12 21:08:10 +01:00
parent db8ea9081f
commit 59deddda6b
3 changed files with 38 additions and 1 deletions

View File

@@ -2032,7 +2032,10 @@ void editor_mode::render_terrain_ui()
ImGui::EndDisabled();
ImGui::SameLine();
if (ImGui::Button(STR_C("Clear the outline##fill")))
{
m_paint_outline.clear();
m_patch_reoutline.clear();
}
// the same outline for the holes and the grass
std::vector<glm::dvec2> outline;
for (auto const &point : m_paint_outline)