mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Create Grid plot collection and allow creation of new combination plots
This commit is contained in:
@@ -24,6 +24,10 @@
|
||||
#include "RiuQwtPlotWidget.h"
|
||||
#include "RiuWellLogPlot.h"
|
||||
|
||||
#include "RimGridCrossPlot.h"
|
||||
#include "RimGridCrossPlotCollection.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimSummaryPlotCollection.h"
|
||||
#include "RimWellLogCurve.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
@@ -83,33 +87,3 @@ void RicWellLogPlotTrackFeatureImpl::moveCurvesToWellLogPlotTrack( RimWellLogTra
|
||||
destTrack->updateParentPlotZoom();
|
||||
destTrack->updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellLogPlotTrackFeatureImpl::movePlotsToGridPlotWindow( RimGridPlotWindow* gridPlotWindow,
|
||||
const std::vector<RimPlotInterface*>& plotsToMove,
|
||||
RimPlotInterface* plotToInsertAfter )
|
||||
{
|
||||
CVF_ASSERT( gridPlotWindow );
|
||||
|
||||
for ( size_t tIdx = 0; tIdx < plotsToMove.size(); tIdx++ )
|
||||
{
|
||||
RimPlotInterface* plot = plotsToMove[tIdx];
|
||||
caf::PdmObject* pdmObject = dynamic_cast<caf::PdmObject*>( plot );
|
||||
RimGridPlotWindow* srcPlot;
|
||||
pdmObject->firstAncestorOrThisOfType( srcPlot );
|
||||
if ( srcPlot )
|
||||
{
|
||||
srcPlot->removePlot( plot );
|
||||
}
|
||||
}
|
||||
|
||||
size_t insertionStartIndex = 0;
|
||||
if ( plotToInsertAfter ) insertionStartIndex = gridPlotWindow->plotIndex( plotToInsertAfter ) + 1;
|
||||
|
||||
for ( size_t tIdx = 0; tIdx < plotsToMove.size(); tIdx++ )
|
||||
{
|
||||
gridPlotWindow->insertPlot( plotsToMove[tIdx], insertionStartIndex + tIdx );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user