summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-03-26 11:11:18 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-03-26 11:11:18 +0100
commit18d7d8d4cecaed1143b2e09b192b406762bf4c2f (patch)
treee7875c4c8557673ba2e68b257bb845cf99ccc28c
parenta7f8f3cee4c36590ff5e7ddc775fc1bfd4d03223 (diff)
add height in search chooser
-rw-r--r--src/choose_hill.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/choose_hill.cxx b/src/choose_hill.cxx
index 9887f59..7f59d68 100644
--- a/src/choose_hill.cxx
+++ b/src/choose_hill.cxx
@@ -18,11 +18,15 @@ choose_hill(const Hills *hills, const char *l) {
h_sort->sort_name();
for (int i=0; i<h_sort->get_num(); i++) {
+ char buf[256];
+
Hill *m = h_sort->get(i);
if (m->flags & (Hill::DUPLICATE | Hill::TRACK_POINT))
continue;
- sc->add(m->name, m);
+ snprintf(buf, sizeof(buf) - 1, "%s (%dm)", m->name, (int) m->height);
+ buf[sizeof(buf) - 1] = '\0';
+ sc->add(buf, m);
}
delete h_sort;