diff options
author | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-09-02 21:26:39 +0200 |
---|---|---|
committer | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-09-02 21:26:39 +0200 |
commit | e806e70958f68a3b0dc9c841cacabacf011ac973 (patch) | |
tree | 8c1b15316c0892e8754b6a87bd97ce0eec951216 | |
parent | 76ec7d66c0bb691f3409beb2448718a0bcefcc50 (diff) | |
download | mana-e806e70958f68a3b0dc9c841cacabacf011ac973.tar.gz mana-e806e70958f68a3b0dc9c841cacabacf011ac973.tar.bz2 mana-e806e70958f68a3b0dc9c841cacabacf011ac973.tar.xz mana-e806e70958f68a3b0dc9c841cacabacf011ac973.zip |
Avoiding empty lines in history
-rw-r--r-- | src/gui/widgets/textfield.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index cffda1e3..4989ae83 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -277,7 +277,8 @@ void TextField::keyPressed(gcn::KeyEvent &keyEvent) if (mHistory) { // If the input is different from previous, put it in the history - if (mHistory->empty() || !mHistory->matchesLastEntry(getText())) + if (!getText().empty() && (mHistory->empty() || + !mHistory->matchesLastEntry(getText()))) { mHistory->addEntry(getText()); } |