From a61f711f88eeb75ae9e1d97d05e925f8100d6c69 Mon Sep 17 00:00:00 2001 From: LRN1986 Date: Sat, 10 Apr 2010 16:24:04 +0000 Subject: [PATCH] Fix ExtImportFilter rule editor space trimming. * Won't ask more than once * Actually trims both leading and trailing spaces --- src/prefs/ExtImportPrefs.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/prefs/ExtImportPrefs.cpp b/src/prefs/ExtImportPrefs.cpp index 90e831a5a..1e7bf0793 100644 --- a/src/prefs/ExtImportPrefs.cpp +++ b/src/prefs/ExtImportPrefs.cpp @@ -435,9 +435,9 @@ void ExtImportPrefs::OnRuleTableEdit (wxGridEvent& event) for (size_t i = 0; i < vals.Count(); i++) { + wxString trimmed = vals[i]; - trimmed.Trim(); - trimmed.Trim(true); + trimmed.Trim().Trim(false); if (trimmed.Cmp(vals[i]) != 0) { if (!askedAboutSpaces) @@ -448,6 +448,7 @@ the items. They are likely to break the pattern matching. Unless you know \ what you are doing, it is recommended to trim spaces. Do you want \ Audacity to trim spaces for you?" ),_("Spaces detected"), wxYES_NO); + askedAboutSpaces = true; } if (fixSpaces != wxYES) {