summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-10-15 13:37:08 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2022-10-15 13:37:08 +0100
commitac61a973ba31a697299226968508702771c162e3 (patch)
tree1f551cdd57036f7ea34d17c1d0d87ab388b4a37f
parentBuilders manage a collection of candidate links rendered by the base builder (diff)
downloadilt-ac61a973ba31a697299226968508702771c162e3.tar.bz2
ilt-ac61a973ba31a697299226968508702771c162e3.tar.xz
ilt-ac61a973ba31a697299226968508702771c162e3.zip
Sequence straights chained together makes no sense
-rw-r--r--ui/builders/straight.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/builders/straight.cpp b/ui/builders/straight.cpp
index 477b40d..4fa9585 100644
--- a/ui/builders/straight.cpp
+++ b/ui/builders/straight.cpp
@@ -32,8 +32,11 @@ BuilderStraight::click(Network * network, const GeoData * geoData, const SDL_Mou
if (p1) {
create(network, *p1, *p);
candidateLinks.removeAll();
+ p1.reset();
+ }
+ else {
+ p1 = p;
}
- p1 = *p;
}
return;
case SDL_BUTTON_MIDDLE: