From bd806b22d0531e3a2214aee8210005993e8fc224 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Mon, 21 Jan 2013 18:36:45 +0100 Subject: [PATCH] Fixed initialization of custom widgets, not shown per default --- src/ui/MAVLinkDecoder.cc | 7 ++++++- src/ui/MainWindow.cc | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ui/MAVLinkDecoder.cc b/src/ui/MAVLinkDecoder.cc index 3f3d07e1d..2b6700ae6 100644 --- a/src/ui/MAVLinkDecoder.cc +++ b/src/ui/MAVLinkDecoder.cc @@ -257,8 +257,13 @@ void MAVLinkDecoder::emitFieldValue(mavlink_message_t* msg, int fieldid, quint64 name = name.arg(messageInfo[msgid].name, fieldName); } - if (multiComponentSourceDetected) name.prepend(QString("C%1:").arg(msg->compid)); + if (multiComponentSourceDetected) + { + name.prepend(QString("C%1:").arg(msg->compid)); + } + name.prepend(QString("M%1:").arg(msg->sysid)); + switch (messageInfo[msgid].fields[fieldid].type) { case MAVLINK_TYPE_CHAR: diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc index 3c41293c0..cc05466d9 100644 --- a/src/ui/MainWindow.cc +++ b/src/ui/MainWindow.cc @@ -360,6 +360,7 @@ void MainWindow::buildCustomWidget() Qt::DockWidgetArea location = static_cast (tool->getDockWidgetArea(currentView)); addDockWidget(location, dock); + dock->hide(); } } } @@ -749,7 +750,7 @@ void MainWindow::loadCustomWidget(const QString& fileName, bool singleinstance) tool->setMainMenuAction(showAction); ui.menuTools->addAction(showAction); this->addDockWidget(Qt::BottomDockWidgetArea, dock); - dock->setVisible(true); + dock->hide(); } else { -- 2.22.0