mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 20:28:42 -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
a9e1a70092
commit
dc3363d490
@ -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