From fe60509ffa1c05c35e267f7beed9ca73dc5620f3 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Fri, 16 May 2014 23:53:04 +0200 Subject: [PATCH] OP-1331 uncrustified --- ground/openpilotgcs/src/libs/utils/mytabbedstackwidget.cpp | 1 + .../openpilotgcs/src/plugins/config/configgadgetwidget.cpp | 7 ++++--- .../src/plugins/uavobjectwidgetutils/configtaskwidget.cpp | 2 +- 3 files changed, 6 insertions(+), 4 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 2cb8b4e86..cd359019b 100644 --- a/ground/openpilotgcs/src/plugins/config/configgadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configgadgetwidget.cpp @@ -165,9 +165,10 @@ void ConfigGadgetWidget::resizeEvent(QResizeEvent *event) void ConfigGadgetWidget::onAutopilotDisconnect() { QWidget *qwd = new DefaultAttitudeWidget(this); + stackWidget->replaceTab(ConfigGadgetWidget::sensors, qwd); - qwd = new DefaultHwSettingsWidget(this); + qwd = new DefaultHwSettingsWidget(this); stackWidget->replaceTab(ConfigGadgetWidget::hardware, qwd); emit autopilotDisconnected(); @@ -187,14 +188,14 @@ void ConfigGadgetWidget::onAutopilotConnect() QWidget *qwd = new ConfigCCAttitudeWidget(this); stackWidget->replaceTab(ConfigGadgetWidget::sensors, qwd); - qwd = new ConfigCCHWWidget(this); + qwd = new ConfigCCHWWidget(this); stackWidget->replaceTab(ConfigGadgetWidget::hardware, qwd); } else if ((board & 0xff00) == 0x0900) { // Revolution family QWidget *qwd = new ConfigRevoWidget(this); stackWidget->replaceTab(ConfigGadgetWidget::sensors, qwd); - qwd = new ConfigRevoHWWidget(this); + qwd = new ConfigRevoHWWidget(this); stackWidget->replaceTab(ConfigGadgetWidget::hardware, qwd); } else { // Unknown board diff --git a/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp b/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp index 3ccb02391..6df939d0a 100644 --- a/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp +++ b/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp @@ -389,7 +389,7 @@ void ConfigTaskWidget::widgetsContentsChanged() foreach(ShadowWidgetBinding * shadow, binding->shadows()) { if (shadow->widget() == emitter) { WidgetBinding tmpBinding(shadow->widget(), binding->object(), binding->field(), - binding->index(), shadow->scale(), shadow->isLimited()); + binding->index(), shadow->scale(), shadow->isLimited()); value = getVariantFromWidget(emitter, &tmpBinding); checkWidgetsLimits(emitter, binding->field(), binding->index(), shadow->isLimited(), value, shadow->scale()); }