mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#373) Fixed update after delete.
Removed the editors used to update after delete, and did all the updating from the command directly. Less code easier to follow, not as generic.
This commit is contained in:
@@ -27,35 +27,6 @@
|
||||
#include "cafPdmUiEditorHandle.h"
|
||||
|
||||
|
||||
class ResViewPropertyFilterEditorHandle : public caf::PdmUiEditorHandle
|
||||
{
|
||||
public:
|
||||
ResViewPropertyFilterEditorHandle(caf::PdmFieldHandle* a)
|
||||
{
|
||||
this->bindToPdmItem(a->uiCapability());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName)
|
||||
{
|
||||
caf::PdmUiFieldHandle* uiFieldHandle = dynamic_cast<caf::PdmUiFieldHandle*>(this->pdmItem());
|
||||
caf::PdmObjectHandle* objHandle = uiFieldHandle->fieldHandle()->ownerObject();
|
||||
|
||||
RimEclipseView* view = NULL;
|
||||
objHandle->firstAnchestorOrThisOfType(view);
|
||||
CVF_ASSERT(view);
|
||||
|
||||
view->scheduleGeometryRegen(PROPERTY_FILTERED);
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
|
||||
// This will update UI editors related to tree view (and others), as there is no tree view entity for editor for
|
||||
// the property filters childarrayfield (this field is hidden)
|
||||
uiObj(objHandle)->updateConnectedEditors();
|
||||
}
|
||||
};
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimEclipsePropertyFilterCollection, "CellPropertyFilters");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -71,7 +42,6 @@ RimEclipsePropertyFilterCollection::RimEclipsePropertyFilterCollection()
|
||||
CAF_PDM_InitField(&active, "Active", true, "Active", "", "", "");
|
||||
active.uiCapability()->setUiHidden(true);
|
||||
|
||||
propertyFilters.uiCapability()->addFieldEditor(new ResViewPropertyFilterEditorHandle(&propertyFilters));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user