mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
dont clear msg everytime
This commit is contained in:
parent
c9e96300b2
commit
6989346f41
|
@ -41,7 +41,8 @@ void ChatTextEdit::keyPressEvent(QKeyEvent * event)
|
|||
*/
|
||||
else if (key == Qt::Key_Up && this->toPlainText().isEmpty())
|
||||
this->setText(lastMessage);
|
||||
else if (key == Qt::Key_Up && !this->toPlainText().isEmpty())
|
||||
else if (key == Qt::Key_Up && !this->toPlainText().isEmpty()
|
||||
&& lastMessage != this->toPlainText())
|
||||
{
|
||||
currentMessage = this->toPlainText();
|
||||
this->setText(lastMessage);
|
||||
|
@ -51,8 +52,6 @@ void ChatTextEdit::keyPressEvent(QKeyEvent * event)
|
|||
this->setPlainText(currentMessage);
|
||||
currentMessage.clear();
|
||||
}
|
||||
else if (key == Qt::Key_Down)
|
||||
this->clear();
|
||||
else
|
||||
{
|
||||
emit keyPressed();
|
||||
|
|
Loading…
Reference in New Issue
Block a user