Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
98936a41
Commit
98936a41
authored
Aug 15, 2013
by
Lorenz Meier
Browse files
Minor UI fixes
parent
eb5a54c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/ui/DebugConsole.cc
View file @
98936a41
...
...
@@ -30,6 +30,7 @@ This file is part of the QGROUNDCONTROL project
*/
#include
<QPainter>
#include
<QSettings>
#include
<QScrollBar>
#include
"DebugConsole.h"
#include
"ui_DebugConsole.h"
...
...
@@ -313,9 +314,15 @@ void DebugConsole::receiveTextMessage(int id, int component, int severity, QStri
break
;
}
//turn off updates while we're appending content to avoid breaking the autoscroll behavior
m_ui
->
receiveText
->
setUpdatesEnabled
(
false
);
QScrollBar
*
scroller
=
m_ui
->
receiveText
->
verticalScrollBar
();
m_ui
->
receiveText
->
appendHtml
(
QString
(
"<font color=
\"
%1
\"
>(%2:%3) %4</font>
\n
"
).
arg
(
UASManager
::
instance
()
->
getUASForId
(
id
)
->
getColor
().
name
(),
name
,
comp
,
text
));
// Ensure text area scrolls correctly
m_ui
->
receiveText
->
ensureCursorVisible
();
scroller
->
setValue
(
scroller
->
maximum
());
m_ui
->
receiveText
->
setUpdatesEnabled
(
true
);
}
}
...
...
src/ui/QGCToolBar.cc
View file @
98936a41
...
...
@@ -75,6 +75,8 @@ void QGCToolBar::heartbeatTimeout(bool timeout, unsigned int ms)
}
toolBarTimeoutLabel
->
setText
(
tr
(
"CONNECTION LOST: %1 s"
).
arg
((
ms
/
1000.0
f
),
2
,
'f'
,
1
,
' '
));
toolBarTimeoutAction
->
setVisible
(
true
);
toolBarMessageLabel
->
hide
();
}
else
{
...
...
@@ -82,6 +84,8 @@ void QGCToolBar::heartbeatTimeout(bool timeout, unsigned int ms)
if
(
toolBarTimeoutAction
->
isVisible
())
{
toolBarTimeoutAction
->
setVisible
(
false
);
toolBarMessageLabel
->
show
();
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment