Merge lines
This commit is contained in:
parent
97d0cfa3d9
commit
50e0b6dd35
1 changed files with 1 additions and 2 deletions
|
@ -45,8 +45,7 @@ void LineEditCompleter::keyPressEvent(QKeyEvent * event)
|
||||||
c->popup()->hide();
|
c->popup()->hide();
|
||||||
//Truncate the line to last space or whole string
|
//Truncate the line to last space or whole string
|
||||||
QString textValue = text();
|
QString textValue = text();
|
||||||
int lastIndexof = textValue.lastIndexOf(" ");
|
int lastIndexof = qMax(0, textValue.lastIndexOf(" "));
|
||||||
lastIndexof = qMax(0, lastIndexof);
|
|
||||||
QString finalString = textValue.left(lastIndexof);
|
QString finalString = textValue.left(lastIndexof);
|
||||||
//Add a space if there's a word
|
//Add a space if there's a word
|
||||||
if (finalString != "")
|
if (finalString != "")
|
||||||
|
|
Loading…
Reference in a new issue