From 749df22c85b83c86ec68ebc74829287e54498e26 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 22 Dec 2024 13:53:27 +0000 Subject: Set terrain heights when creating new network links --- ui/builders/freeExtend.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ui/builders/freeExtend.cpp') diff --git a/ui/builders/freeExtend.cpp b/ui/builders/freeExtend.cpp index 904e144..fa08af6 100644 --- a/ui/builders/freeExtend.cpp +++ b/ui/builders/freeExtend.cpp @@ -61,11 +61,15 @@ BuilderFreeExtend::click( Link::CCollection BuilderFreeExtend::createJoin(Network * network, GlobalPosition3D p1, GlobalPosition3D p2) const { - return network->addJoins(p1, p2); + const auto links = network->addJoins(p1, p2); + setHeightsFor(network, links); + return links; } Link::CCollection BuilderFreeExtend::createExtend(Network * network, GlobalPosition3D p1, GlobalPosition3D p2) const { - return network->addExtend(p1, p2); + const auto links = network->addExtend(p1, p2); + setHeightsFor(network, links); + return links; } -- cgit v1.2.3