mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
OP-984 Fixed false dirty indication. Added some constant.
This commit is contained in:
parent
b14c8bd4d2
commit
38a709a0da
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user