diff --git a/ground/openpilotgcs/src/libs/utils/mytabbedstackwidget.cpp b/ground/openpilotgcs/src/libs/utils/mytabbedstackwidget.cpp index 98311bfee..e465b50f9 100644 --- a/ground/openpilotgcs/src/libs/utils/mytabbedstackwidget.cpp +++ b/ground/openpilotgcs/src/libs/utils/mytabbedstackwidget.cpp @@ -59,7 +59,7 @@ MyTabbedStackWidget::MyTabbedStackWidget(QWidget *parent, bool isVertical, bool } if (m_iconAbove && m_vertical) { - m_listWidget->setFixedWidth(80); // this should be computed instead + m_listWidget->setFixedWidth(LIST_VIEW_WIDTH); // this should be computed instead m_listWidget->setWrapping(false); } @@ -137,7 +137,7 @@ void MyTabbedStackWidget::showWidget(int index) void MyTabbedStackWidget::resizeEvent(QResizeEvent *event) { QWidget::resizeEvent(event); - m_listWidget->setFixedWidth(m_listWidget->verticalScrollBar()->isVisible() ? 100 : 80); + m_listWidget->setFixedWidth(m_listWidget->verticalScrollBar()->isVisible() ? LIST_VIEW_WIDTH + 20 : LIST_VIEW_WIDTH); } void MyTabbedStackWidget::insertCornerWidget(int index, QWidget *widget) diff --git a/ground/openpilotgcs/src/libs/utils/mytabbedstackwidget.h b/ground/openpilotgcs/src/libs/utils/mytabbedstackwidget.h index cbfd11e74..4b0777e4e 100644 --- a/ground/openpilotgcs/src/libs/utils/mytabbedstackwidget.h +++ b/ground/openpilotgcs/src/libs/utils/mytabbedstackwidget.h @@ -76,6 +76,7 @@ private: QStackedWidget *m_stackWidget; bool m_vertical; bool m_iconAbove; + static const int LIST_VIEW_WIDTH = 80; protected: void resizeEvent(QResizeEvent * event); diff --git a/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp b/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp index c79b5fdd1..00fc4250f 100644 --- a/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp +++ b/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp @@ -173,18 +173,19 @@ void ConfigTaskWidget::setWidgetBindingObjectEnabled(QString objectName, bool en Q_ASSERT(object); + bool dirtyBack = isDirty(); + foreach(WidgetBinding * binding, m_widgetBindingsPerObject.values(object)) { binding->setIsEnabled(enabled); if (enabled) { - // disconnectWidgetUpdatesToSlot(binding->widget(), SLOT(widgetsContentsChanged())); if (binding->value().isValid() && !binding->value().isNull()) { setWidgetFromVariant(binding->widget(), binding->value(), binding->scale()); } else { setWidgetFromField(binding->widget(), binding->field(), binding->index(), binding->scale(), binding->isLimited()); } - // connectWidgetUpdatesToSlot(binding->widget(), SLOT(widgetsContentsChanged())); } } + setDirty(dirtyBack); } ConfigTaskWidget::~ConfigTaskWidget()