(#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:
Jacob Støren
2015-08-14 15:20:50 +02:00
parent fc146bb554
commit a8a1b61646
4 changed files with 42 additions and 88 deletions

View File

@@ -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));
}
//--------------------------------------------------------------------------------------------------