mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 09:00:20 -05:00
#14884 Reparent hidden field labels when rebuilding form layout
A hidden label is never added to a layout, so it stayed parented to the group box it was created in. When the field moved directly to another group, the old group box was deleted together with the label, and the next update hit a null label in PdmUiCheckBoxEditor. Add GroupVisibilityByEnum to cafTestApplication to reproduce the crash.
This commit is contained in:
1 parent
4d68f66455
commit
277322cbcb
7 files changed
+142
-4
No files matched your search
@@ -189,8 +189,12 @@ void RiuSummaryVectorSelectionWidgetCreator::configureAndUpdateFields( int
|
||||
}
|
||||
else
|
||||
{
|
||||
QWidget* fieldLabelWidget = fieldEditor->labelWidget();
|
||||
if ( fieldLabelWidget ) fieldLabelWidget->hide();
|
||||
if ( auto fieldLabelWidget = fieldEditor->labelWidget() )
|
||||
{
|
||||
// Reparent so the label is not deleted with a previous group box
|
||||
fieldLabelWidget->setParent( widget() );
|
||||
fieldLabelWidget->hide();
|
||||
}
|
||||
}
|
||||
|
||||
if ( fieldEditorWidget )
|
||||
|
||||
Reference in new issue
Block a user