Allow deleting of the last sub plot and have nice visible drop targets

This commit is contained in:
Gaute Lindkvist
2019-10-29 08:53:14 +01:00
parent 089ca3d39d
commit 38e0b150ac
15 changed files with 350 additions and 119 deletions

View File

@@ -23,6 +23,7 @@
#include "RimFlowPlotCollection.h"
#include "RimGridCrossPlot.h"
#include "RimGridCrossPlotCollection.h"
#include "RimGridPlotWindowCollection.h"
#include "RimPltPlotCollection.h"
#include "RimProject.h"
#include "RimRftPlotCollection.h"
@@ -84,6 +85,9 @@ RimMainPlotCollection::RimMainPlotCollection()
"" );
m_saturationPressurePlotCollection.uiCapability()->setUiHidden( true );
CAF_PDM_InitFieldNoDefault( &m_combinationPlotCollection, "RimGridPlotWindowCollection", "Combination Plots", "", "", "" );
m_combinationPlotCollection.uiCapability()->setUiHidden( true );
m_wellLogPlotCollection = new RimWellLogPlotCollection();
m_rftPlotCollection = new RimRftPlotCollection();
m_pltPlotCollection = new RimPltPlotCollection();
@@ -180,6 +184,14 @@ RimSaturationPressurePlotCollection* RimMainPlotCollection::saturationPressurePl
return m_saturationPressurePlotCollection();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimGridPlotWindowCollection* RimMainPlotCollection::combinationPlotCollection()
{
return m_combinationPlotCollection();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -193,6 +205,7 @@ void RimMainPlotCollection::deleteAllContainedObjects()
m_gridCrossPlotCollection->deleteAllChildObjects();
m_flowPlotCollection()->closeDefaultPlotWindowAndDeletePlots();
m_saturationPressurePlotCollection()->deleteAllChildObjects();
m_combinationPlotCollection()->deleteAllChildObjects();
}
//--------------------------------------------------------------------------------------------------
@@ -244,6 +257,14 @@ void RimMainPlotCollection::updatePlotsWithFormations()
crossPlot->loadDataAndUpdate();
}
}
if ( m_combinationPlotCollection )
{
for ( RimGridPlotWindow* plotWindow : m_combinationPlotCollection->gridPlotWindows() )
{
plotWindow->loadDataAndUpdate();
}
}
}
//--------------------------------------------------------------------------------------------------
@@ -258,6 +279,14 @@ void RimMainPlotCollection::updatePlotsWithCompletions()
wellLogPlot->loadDataAndUpdate();
}
}
if ( m_combinationPlotCollection )
{
for ( RimGridPlotWindow* plotWindow : m_combinationPlotCollection->gridPlotWindows() )
{
plotWindow->loadDataAndUpdate();
}
}
}
//--------------------------------------------------------------------------------------------------