#12020 Delay the call to updateConnectedEditors

Make sure the call to updateConnectedEditors happens after other slots have been processed. Also make sure that the call is done only once.
This commit is contained in:
Magne Sjaastad 2025-01-04 09:18:48 +01:00
parent 1251a2750e
commit 1f7af45c05

View File

@ -63,6 +63,7 @@
#include "cafPdmUiTreeOrdering.h"
#include "cafProgressInfo.h"
#include "cafTitledOverlayFrame.h"
#include "cvfScalarMapper.h"
#include <QString>
@ -1421,7 +1422,12 @@ void RimGridCrossPlotDataSet::triggerPlotNameUpdateAndReplot()
{
parent->updateCurveNamesAndPlotTitle();
parent->reattachAllCurves();
parent->updateConnectedEditors();
// updateConnectedEditors() causes the UI editor to be recreated (and the widgets contained in the UI editor). The function
// calling this function can in some cases comes from the widget to be destroyed, typically the tree view selection editor
// displaying available result properties. Using a scheduler will ensure that all other slots are processed before the
// updateConnectedEditors() is called.
parent->scheduleUpdateConnectedEditors();
}
}