aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-03-04 11:59:27 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-04 11:59:27 -0800
commitfd95789e4993a28acb9054e6278d114a419d48ce (patch)
treeb8f55e38ebf84ee0956b5bb445a15447fd19bc95 /samplecode
parentd8829015768a1cf989ffb13e6e632c8f21d339db (diff)
Ignore backspace when appending to the filter string in SampleApp. Fixes a bug on Windows where the initial Backspace gets appended, causing no slides to match.
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/OverView.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/samplecode/OverView.cpp b/samplecode/OverView.cpp
index d7633452bc..8520f57000 100644
--- a/samplecode/OverView.cpp
+++ b/samplecode/OverView.cpp
@@ -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;
}