From 2d4ad5a76d49e19b12bc3f172af8acc9cbadba73 Mon Sep 17 00:00:00 2001 From: Corvus Corax Date: Fri, 16 May 2014 23:42:17 +0200 Subject: [PATCH] uncrustification --- ground/openpilotgcs/src/libs/utils/mytabbedstackwidget.cpp | 1 + .../openpilotgcs/src/plugins/config/configgadgetwidget.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ground/openpilotgcs/src/libs/utils/mytabbedstackwidget.cpp b/ground/openpilotgcs/src/libs/utils/mytabbedstackwidget.cpp index c1e8e8076..bc31f58c0 100644 --- a/ground/openpilotgcs/src/libs/utils/mytabbedstackwidget.cpp +++ b/ground/openpilotgcs/src/libs/utils/mytabbedstackwidget.cpp @@ -84,6 +84,7 @@ void MyTabbedStackWidget::insertTab(const int index, QWidget *tab, const QIcon & { // create and insert item QListWidgetItem *item = new QListWidgetItem(icon, label); + item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); item->setTextAlignment(Qt::AlignHCenter | Qt::AlignBottom); item->setToolTip(label); diff --git a/ground/openpilotgcs/src/plugins/config/configgadgetwidget.cpp b/ground/openpilotgcs/src/plugins/config/configgadgetwidget.cpp index 368037842..3b80223b3 100644 --- a/ground/openpilotgcs/src/plugins/config/configgadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configgadgetwidget.cpp @@ -167,9 +167,10 @@ void ConfigGadgetWidget::resizeEvent(QResizeEvent *event) void ConfigGadgetWidget::onAutopilotDisconnect() { QWidget *qwd = new DefaultAttitudeWidget(this); + ftw->replaceTab(ConfigGadgetWidget::sensors, qwd); - qwd = new DefaultHwSettingsWidget(this); + qwd = new DefaultHwSettingsWidget(this); ftw->replaceTab(ConfigGadgetWidget::hardware, qwd); emit autopilotDisconnected(); @@ -190,14 +191,14 @@ void ConfigGadgetWidget::onAutopilotConnect() QWidget *qwd = new ConfigCCAttitudeWidget(this); ftw->replaceTab(ConfigGadgetWidget::sensors, qwd); - qwd = new ConfigCCHWWidget(this); + qwd = new ConfigCCHWWidget(this); ftw->replaceTab(ConfigGadgetWidget::hardware, qwd); } else if ((board & 0xff00) == 0x0900) { // Revolution family QWidget *qwd = new ConfigRevoWidget(this); ftw->replaceTab(ConfigGadgetWidget::sensors, qwd); - qwd = new ConfigRevoHWWidget(this); + qwd = new ConfigRevoHWWidget(this); ftw->replaceTab(ConfigGadgetWidget::hardware, qwd); } else { // Unknown board