Ignore backspace when appending to the filter string in SampleApp. Fixes a bug on...
authorbrianosman <brianosman@google.com>
Fri, 4 Mar 2016 19:59:27 +0000 (11:59 -0800)
committerCommit bot <commit-bot@chromium.org>
Fri, 4 Mar 2016 19:59:27 +0000 (11:59 -0800)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1767683002

Review URL: https://codereview.chromium.org/1767683002

samplecode/OverView.cpp

index d7633452bc3c98e2864564e1ab59b14640ea7576..8520f5700051bf1932fab02a7fb5ab5e0685d230 100644 (file)
@@ -59,7 +59,9 @@ protected:
         }
         SkUnichar uni;
         if (SampleCode::CharQ(*evt, &uni)) {
-            fMatchStr.appendUnichar(uni);
+            if (uni >= ' ') {
+                fMatchStr.appendUnichar(uni);
+            }
             this->inval(nullptr);
             return true;
         }