mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 22:50:25 -05:00
#12599 Call hide on editor to trigger cleanup
Trigger a hide event the editor to allow it to clean up. This is required to persist the changes in the editor when changing to a different dock widget.
This commit is contained in:
1 parent
ea9f0e0c81
commit
a5d010fe60
1 file changed
+12
-2
@@ -492,8 +492,18 @@ void caf::PdmUiFormLayoutObjectEditor::cleanupBeforeSettingPdmObject()
|
||||
std::map<PdmFieldHandle*, PdmUiFieldEditorHandle*>::iterator it;
|
||||
for ( it = m_fieldViews.begin(); it != m_fieldViews.end(); ++it )
|
||||
{
|
||||
PdmUiFieldEditorHandle* fvh = it->second;
|
||||
delete fvh;
|
||||
if ( PdmUiFieldEditorHandle* fvh = it->second )
|
||||
{
|
||||
if ( auto editor = fvh->editorWidget() )
|
||||
{
|
||||
// Trigger a hide event the editor to allow it to clean up. This is required to persist the changes in
|
||||
// the editor when changing to a different dock widget.
|
||||
// https://github.com/OPM/ResInsight/issues/12599
|
||||
editor->hide();
|
||||
}
|
||||
|
||||
delete fvh;
|
||||
}
|
||||
}
|
||||
m_fieldViews.clear();
|
||||
|
||||
|
||||
Reference in new issue
Block a user