mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-11 19:24:10 +01:00
GCS GPS Display: Noticed redrawing got real slow if I left the GPS
Display running for a while. I'm blaming that on the text area filling with a million lines, though that still needs to be confirmed. So I added a arbritrary 200 line limit, after which lines at the top start disapearing. Seems sensible anyways :) git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1730 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
1472b342c1
commit
1758f55f1c
@ -96,6 +96,13 @@ void GpsDisplayWidget::setFixType(const QString &fixtype)
|
|||||||
void GpsDisplayWidget::dumpPacket(const QString &packet)
|
void GpsDisplayWidget::dumpPacket(const QString &packet)
|
||||||
{
|
{
|
||||||
textBrowser->append(packet);
|
textBrowser->append(packet);
|
||||||
|
if(textBrowser->document()->lineCount() > 200) {
|
||||||
|
QTextCursor tc = textBrowser->textCursor();
|
||||||
|
tc.movePosition(QTextCursor::Start);
|
||||||
|
tc.movePosition(QTextCursor::Down, QTextCursor::KeepAnchor);
|
||||||
|
tc.movePosition(QTextCursor::StartOfLine, QTextCursor::KeepAnchor);
|
||||||
|
tc.removeSelectedText();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GpsDisplayWidget::setSVs(int sv)
|
void GpsDisplayWidget::setSVs(int sv)
|
||||||
|
Loading…
Reference in New Issue
Block a user