mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Added UI editor handle to update 3D view
This commit is contained in:
parent
bcf1109412
commit
8f051e6a72
@ -105,13 +105,6 @@ void RicDeleteItemExec::undo()
|
|||||||
|
|
||||||
listField->uiCapability()->updateConnectedEditors();
|
listField->uiCapability()->updateConnectedEditors();
|
||||||
|
|
||||||
/*
|
|
||||||
uiObj(obj)->updateConnectedEditors();
|
|
||||||
|
|
||||||
listField->uiCapability()->updateConnectedEditors();
|
|
||||||
uiObj(listField->ownerObject())->updateConnectedEditors();
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (m_notificationCenter) m_notificationCenter->notifyObservers();
|
if (m_notificationCenter) m_notificationCenter->notifyObservers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,16 +20,50 @@
|
|||||||
|
|
||||||
#include "RimCellRangeFilterCollection.h"
|
#include "RimCellRangeFilterCollection.h"
|
||||||
|
|
||||||
#include "RimEclipseCase.h"
|
|
||||||
#include "RigGridBase.h"
|
|
||||||
#include "RimEclipseView.h"
|
|
||||||
#include "RigCaseData.h"
|
#include "RigCaseData.h"
|
||||||
#include "RigFemPartCollection.h"
|
|
||||||
#include "RimGeoMechView.h"
|
|
||||||
#include "RimGeoMechCase.h"
|
|
||||||
#include "RigGeoMechCaseData.h"
|
|
||||||
#include "RigFemPart.h"
|
#include "RigFemPart.h"
|
||||||
|
#include "RigFemPartCollection.h"
|
||||||
#include "RigFemPartGrid.h"
|
#include "RigFemPartGrid.h"
|
||||||
|
#include "RigGeoMechCaseData.h"
|
||||||
|
#include "RigGridBase.h"
|
||||||
|
#include "RimEclipseCase.h"
|
||||||
|
#include "RimEclipseView.h"
|
||||||
|
#include "RimGeoMechCase.h"
|
||||||
|
#include "RimGeoMechView.h"
|
||||||
|
|
||||||
|
#include "cafPdmUiEditorHandle.h"
|
||||||
|
|
||||||
|
class ResViewRangeFiltersEditorHandle : public caf::PdmUiEditorHandle
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ResViewRangeFiltersEditorHandle(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->firstAncestorOfType(view);
|
||||||
|
CVF_ASSERT(view);
|
||||||
|
|
||||||
|
view->scheduleGeometryRegen(RANGE_FILTERED);
|
||||||
|
view->scheduleGeometryRegen(RANGE_FILTERED_INACTIVE);
|
||||||
|
|
||||||
|
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(RimCellRangeFilterCollection, "CellRangeFilterCollection");
|
CAF_PDM_SOURCE_INIT(RimCellRangeFilterCollection, "CellRangeFilterCollection");
|
||||||
|
|
||||||
@ -45,6 +79,8 @@ RimCellRangeFilterCollection::RimCellRangeFilterCollection()
|
|||||||
|
|
||||||
CAF_PDM_InitField(&isActive, "Active", true, "Active", "", "", "");
|
CAF_PDM_InitField(&isActive, "Active", true, "Active", "", "", "");
|
||||||
isActive.uiCapability()->setUiHidden(true);
|
isActive.uiCapability()->setUiHidden(true);
|
||||||
|
|
||||||
|
rangeFilters.uiCapability()->addFieldEditor(new ResViewRangeFiltersEditorHandle(&rangeFilters));
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user