mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-27 14:48:46 -05:00
Maintain cursor position during free text edits.
The validation processing of the free text line edit field was causing the cursor position to be lost. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4148 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
99444bce7c
commit
154b64b183
@ -2174,12 +2174,14 @@ void MainWindow::msgtype(QString t, QLineEdit* tx) //msgtype()
|
||||
}
|
||||
tx->setPalette(p);
|
||||
int len=t.length();
|
||||
auto pos = tx->cursorPosition ();
|
||||
if(text) {
|
||||
len=qMin(len,13);
|
||||
tx->setText(t.mid(0,len).toUpper());
|
||||
} else {
|
||||
tx->setText(t);
|
||||
}
|
||||
tx->setCursorPosition (pos);
|
||||
}
|
||||
|
||||
void MainWindow::on_tx1_editingFinished() //tx1 edited
|
||||
|
Loading…
Reference in New Issue
Block a user