From d31ef86d0b51092bab5813f1cc893fdf6d688123 Mon Sep 17 00:00:00 2001 From: Jonas Suhr Christensen Date: Fri, 5 Dec 2014 23:50:14 +0100 Subject: Removed printf/debug and outcommented code. --- plugingui/lineedit.cc | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'plugingui') diff --git a/plugingui/lineedit.cc b/plugingui/lineedit.cc index b8f7ca2..5e1eb9b 100644 --- a/plugingui/lineedit.cc +++ b/plugingui/lineedit.cc @@ -76,7 +76,6 @@ void GUI::LineEdit::setText(std::string text) { _text = text; pos = text.size(); -// if(_text.size() < pos) pos = text.size(); repaintEvent(NULL); textChanged(); @@ -99,7 +98,6 @@ void GUI::LineEdit::buttonEvent(ButtonEvent *e) break; } } -// if(e->x >= (int)(font.textWidth(_visibletext) + BORDER)) pos = _visibletext.length(); repaintEvent(NULL); } } @@ -108,8 +106,6 @@ void GUI::LineEdit::keyEvent(GUI::KeyEvent *e) { if(readOnly()) return; - DEBUG(lineedit, "Handling keyevent with text '%s'\n", _text.c_str()); - bool change = false; if(e->direction == -1) { @@ -117,7 +113,6 @@ void GUI::LineEdit::keyEvent(GUI::KeyEvent *e) if(e->keycode == GUI::KeyEvent::KEY_LEFT) { if(pos) pos--; if(offsetpos >= pos) walkstate = WALK_LEFT; -// else walkstate = NOOP; } else if(e->keycode == GUI::KeyEvent::KEY_HOME) { pos = 0; @@ -129,7 +124,6 @@ void GUI::LineEdit::keyEvent(GUI::KeyEvent *e) if(pos < _text.length()) pos++; if(offsetpos + _visibletext.length() <= pos && pos < _text.length()) walkstate = WALK_RIGHT; -// else walkstate = NOOP; } else if(e->keycode == GUI::KeyEvent::KEY_DELETE) { if(pos < _text.length()) { @@ -210,9 +204,6 @@ void GUI::LineEdit::repaintEvent(GUI::RepaintEvent *e) } } else { - DEBUG(lienedit, "Full text: '%s'\n", _text.c_str()); - DEBUG(lineedit, "Drawing text in lineedit '%s'\n", _visibletext.c_str()); - DEBUG(lineedit, "Offset, pos: %d, %d\n", offsetpos, pos); break; } } @@ -224,9 +215,7 @@ void GUI::LineEdit::repaintEvent(GUI::RepaintEvent *e) if(readOnly()) return; if(hasKeyboardFocus()) { -// size_t px = font.textWidth(_text.substr(0, pos - offsetpos)); size_t px = font.textWidth(_visibletext.substr(0, pos - offsetpos)); - //p.setColour(Colour(0.8)); p.drawLine(px + BORDER - 1 - 4 + 3, 6, px + BORDER - 1 - 4 + 3, height() - 7); } -- cgit v1.2.3