mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
added comment to explain this spaghetti
This commit is contained in:
parent
d3cdebd46f
commit
c9e96300b2
@ -31,6 +31,14 @@ void ChatTextEdit::keyPressEvent(QKeyEvent * event)
|
||||
emit enterPressed();
|
||||
else if (key == Qt::Key_Tab)
|
||||
emit tabPressed();
|
||||
/**
|
||||
If message box is empty, it will paste previous message on arrow up
|
||||
if message box is not empty,
|
||||
it will copy current(2) text and paste previous(1) message,
|
||||
to paste previous message(2) press arrow down,
|
||||
press arrow down twice to clear mesage box,
|
||||
only previous message(1) is available to paste now.
|
||||
*/
|
||||
else if (key == Qt::Key_Up && this->toPlainText().isEmpty())
|
||||
this->setText(lastMessage);
|
||||
else if (key == Qt::Key_Up && !this->toPlainText().isEmpty())
|
||||
|
Loading…
x
Reference in New Issue
Block a user