Commit 9ed0ab6e authored by Don Gagne's avatar Don Gagne

Merge pull request #2677 from DonLakeFlyer/InfoView

Info View: Fix multi-vehicle handling
parents e34413a4 3a17aa64
......@@ -54,10 +54,7 @@ UASMessageViewWidget::UASMessageViewWidget(UASMessageHandler* uasMessageHandler,
, _uasMessageHandler(uasMessageHandler)
{
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
// 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.
......@@ -85,16 +82,7 @@ void UASMessageViewWidget::handleTextMessage(UASMessage *message)
// Reset
if(!message) {
ui()->plainTextEdit->clear();
_unconnectedWidget->show();
ui()->plainTextEdit->hide();
} 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;
// Turn off updates while we're appending content to avoid breaking the autoscroll behavior
msgWidget->setUpdatesEnabled(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment