From 0887f89350d9f55978f39ce463356c7d6170fde2 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Mon, 1 May 2017 17:34:25 +0200 Subject: [PATCH] Do not add symbols twice to Encoding::symbolsList() Also sort the list properly. Fixes #10644 --- src/Encoding.cpp | 7 +++++-- status.22x | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Encoding.cpp b/src/Encoding.cpp index 73edc843ff..989f885e14 100644 --- a/src/Encoding.cpp +++ b/src/Encoding.cpp @@ -264,11 +264,14 @@ vector Encoding::symbolsList() const // add those below start_encodable_ for (char_type c = 0; c < start_encodable_; ++c) symbols.push_back(c); - // now the ones from the unicodesymbols file + // now the ones from the unicodesymbols file that are not already there CharInfoMap::const_iterator const end = unicodesymbols.end(); CharInfoMap::const_iterator it = unicodesymbols.begin(); for (; it != end; ++it) - symbols.push_back(it->first); + if (find(symbols.begin(), symbols.end(), it->first) == symbols.end()) + symbols.push_back(it->first); + // finally, sort the vector + sort(symbols.begin(), symbols.end()); return symbols; } diff --git a/status.22x b/status.22x index fda8f8f00b..5f3cc9aeb1 100644 --- a/status.22x +++ b/status.22x @@ -43,6 +43,7 @@ What's new * USER INTERFACE +- Remove duplicate entries from the Symbols dialog (bug 10644). * INTERNALS