1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-02 10:24:11 +01:00

OP-984 Minor changes.

This commit is contained in:
Fredrik Arvidsson 2014-01-09 09:39:47 +01:00
parent 958efa62e1
commit a3c03b0244
2 changed files with 7 additions and 1 deletions

View File

@ -36,13 +36,14 @@
#include <QUrl>
#include <QList>
#include <QTabBar>
#include <QMessageBox>
#include <extensionsystem/pluginmanager.h>
#include <coreplugin/generalsettings.h>
#include "altitudeholdsettings.h"
ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTaskWidget(parent),
boardModel(0)
boardModel(0), m_currentPIDBank(0)
{
ui = new Ui_StabilizationWidget();
ui->setupUi(this);
@ -227,13 +228,17 @@ void ConfigStabilizationWidget::onBoardConnected()
void ConfigStabilizationWidget::pidBankChanged(int index)
{
foreach(QTabBar * tabBar, m_pidTabBars) {
disconnect(tabBar, SIGNAL(currentChanged(int)), this, SLOT(pidBankChanged(int)));
tabBar->setCurrentIndex(index);
connect(tabBar, SIGNAL(currentChanged(int)), this, SLOT(pidBankChanged(int)));
}
for(int i = 0; i < m_pidTabBars.at(0)->count(); i++) {
setWidgetBindingObjectEnabled(m_pidTabBars.at(0)->tabData(i).toString(), index == i);
}
m_currentPIDBank = index;
}
bool ConfigStabilizationWidget::shouldObjectBeSaved(UAVObject *object)

View File

@ -57,6 +57,7 @@ private:
static const int PID_BANKS = 3;
int boardModel;
int m_currentPIDBank;
protected:
QString mapObjectName(const QString objectName);