Ui Form Layout, simplify comment for label content margin shift.

This commit is contained in:
Gaute Lindkvist 2018-09-28 09:39:52 +02:00
parent a9d37027ea
commit e91bdece9c

View File

@ -221,9 +221,7 @@ void caf::PdmUiFormLayoutObjectEditor::recursivelyConfigureAndUpdateUiOrderingIn
fieldLabelWidget->setParent(containerWidgetWithGridLayout);
parentLayout->addWidget(fieldLabelWidget, currentRowIndex, currentColumn, 1, leftLabelColumnSpan, Qt::AlignTop);
// Shift label a bit to make it appear centered on the field. Using Qt::AlignVCenter will
// cause both label and field to appear in the vertical centre of the row.
// That isn't the intention.
// Apply margins determined by the editor type
fieldLabelWidget->setContentsMargins(fieldEditor->labelContentMargins());
}
fieldEditorWidget->setParent(containerWidgetWithGridLayout); // To make sure this widget has the current group box as parent.