mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Well paths: Update display model after delete
This commit is contained in:
parent
9abc3387aa
commit
76ffd7e937
@ -1586,7 +1586,16 @@ void RimUiTreeView::slotDeleteAllWellPaths()
|
||||
if (myModel)
|
||||
{
|
||||
myModel->deleteAllWellPaths(currentIndex());
|
||||
|
||||
caf::PdmUiTreeItem* uiItem = myModel->getTreeItemFromIndex(currentIndex());
|
||||
if (uiItem && uiItem->dataObject())
|
||||
{
|
||||
RimWellPathCollection* wellPathCollection = dynamic_cast<RimWellPathCollection*>(uiItem->dataObject().p());
|
||||
if (wellPathCollection)
|
||||
{
|
||||
wellPathCollection->scheduleGeometryRegenAndRedrawViews();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -108,8 +108,7 @@ RimWellPathCollection::~RimWellPathCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
m_wellPathCollectionPartManager->scheduleGeometryRegen();
|
||||
if (m_project) m_project->createDisplayModelAndRedrawAllViews();
|
||||
scheduleGeometryRegenAndRedrawViews();
|
||||
}
|
||||
|
||||
|
||||
@ -227,6 +226,15 @@ caf::PdmFieldHandle* RimWellPathCollection::objectToggleField()
|
||||
return &isActive;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::scheduleGeometryRegenAndRedrawViews()
|
||||
{
|
||||
m_wellPathCollectionPartManager->scheduleGeometryRegen();
|
||||
if (m_project) m_project->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -73,6 +73,7 @@ public:
|
||||
|
||||
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
|
||||
|
||||
void scheduleGeometryRegenAndRedrawViews();
|
||||
|
||||
private:
|
||||
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
|
Loading…
Reference in New Issue
Block a user