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
3a17aa64
Commit
3a17aa64
authored
Jan 20, 2016
by
Don Gagne
Browse files
Fix multi-vehicle handling
parent
b867851a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ui/uas/UASMessageView.cc
View file @
3a17aa64
...
@@ -54,10 +54,7 @@ UASMessageViewWidget::UASMessageViewWidget(UASMessageHandler* uasMessageHandler,
...
@@ -54,10 +54,7 @@ UASMessageViewWidget::UASMessageViewWidget(UASMessageHandler* uasMessageHandler,
,
_uasMessageHandler
(
uasMessageHandler
)
,
_uasMessageHandler
(
uasMessageHandler
)
{
{
setStyleSheet
(
"QPlainTextEdit { border: 0px }"
);
setStyleSheet
(
"QPlainTextEdit { border: 0px }"
);
// Construct initial widget
_unconnectedWidget
=
new
QGCUnconnectedInfoWidget
(
this
);
ui
()
->
horizontalLayout
->
addWidget
(
_unconnectedWidget
);
ui
()
->
plainTextEdit
->
hide
();
// Enable the right-click menu for the text editor. This works because the plainTextEdit
// Enable the right-click menu for the text editor. This works because the plainTextEdit
// widget has its context menu policy set to its actions list. So any actions we add
// widget has its context menu policy set to its actions list. So any actions we add
// to this widget's action list will be automatically displayed.
// to this widget's action list will be automatically displayed.
...
@@ -85,16 +82,7 @@ void UASMessageViewWidget::handleTextMessage(UASMessage *message)
...
@@ -85,16 +82,7 @@ void UASMessageViewWidget::handleTextMessage(UASMessage *message)
// Reset
// Reset
if
(
!
message
)
{
if
(
!
message
)
{
ui
()
->
plainTextEdit
->
clear
();
ui
()
->
plainTextEdit
->
clear
();
_unconnectedWidget
->
show
();
ui
()
->
plainTextEdit
->
hide
();
}
else
{
}
else
{
// Make sure the UI is configured for showing messages.
// Note that this call is NOT equivalent to `_unconnectedWidget->isVisible()`.
if
(
!
_unconnectedWidget
->
isHidden
())
{
_unconnectedWidget
->
hide
();
ui
()
->
plainTextEdit
->
show
();
}
QPlainTextEdit
*
msgWidget
=
ui
()
->
plainTextEdit
;
QPlainTextEdit
*
msgWidget
=
ui
()
->
plainTextEdit
;
// Turn off updates while we're appending content to avoid breaking the autoscroll behavior
// Turn off updates while we're appending content to avoid breaking the autoscroll behavior
msgWidget
->
setUpdatesEnabled
(
false
);
msgWidget
->
setUpdatesEnabled
(
false
);
...
...
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