Add some features to well log plot, track and curve creation.

* Needed for creating the well bore stability plots
* Add ability to set plot and track titles
* Make updating and refreshing plots optional when adding curves/tracks so it can be done at the end instead.
* Optionally set custom titles to the plots and tracks.
This commit is contained in:
Gaute Lindkvist
2018-06-29 11:36:50 +02:00
parent e1fa79c066
commit e39a34cd0d
6 changed files with 102 additions and 28 deletions

View File

@@ -206,7 +206,13 @@ RimWellPath* RicWellLogTools::findWellPathWithLogFileFromSelection()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellLogExtractionCurve* RicWellLogTools::addExtractionCurve(RimWellLogTrack* plotTrack, Rim3dView* view, RimWellPath* wellPath, const RimSimWellInView* simWell, int branchIndex, bool useBranchDetection)
RimWellLogExtractionCurve* RicWellLogTools::addExtractionCurve(RimWellLogTrack* plotTrack,
Rim3dView* view,
RimWellPath* wellPath,
const RimSimWellInView* simWell,
int branchIndex,
bool useBranchDetection,
bool showPlotWindow)
{
CVF_ASSERT(plotTrack);
RimWellLogExtractionCurve* curve = new RimWellLogExtractionCurve();
@@ -238,20 +244,23 @@ RimWellLogExtractionCurve* RicWellLogTools::addExtractionCurve(RimWellLogTrack*
plotTrack->updateConnectedEditors();
// Make sure the summary plot window is created and visible
RiuPlotMainWindowTools::showPlotMainWindow();
RiaApplication::instance()->project()->updateConnectedEditors();
RiaApplication::instance()->getOrCreateMainPlotWindow();
RiuPlotMainWindowTools::selectAsCurrentItem(curve);
if (showPlotWindow)
{
// Make sure the summary plot window is visible
RiuPlotMainWindowTools::showPlotMainWindow();
}
return curve;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellLogRftCurve* RicWellLogTools::addRftCurve(RimWellLogTrack* plotTrack, const RimSimWellInView* simWell)
RimWellLogRftCurve* RicWellLogTools::addRftCurve(RimWellLogTrack* plotTrack, const RimSimWellInView* simWell, bool showPlotWindow)
{
CVF_ASSERT(plotTrack);
@@ -287,19 +296,23 @@ RimWellLogRftCurve* RicWellLogTools::addRftCurve(RimWellLogTrack* plotTrack, con
plotTrack->setFormationTrajectoryType(RimWellLogTrack::SIMULATION_WELL);
plotTrack->updateConnectedEditors();
RiuPlotMainWindowTools::showPlotMainWindow();
RiaApplication::instance()->project()->updateConnectedEditors();
RiaApplication::instance()->getOrCreateMainPlotWindow();
RiuPlotMainWindowTools::selectAsCurrentItem(curve);
if (showPlotWindow)
{
// Make sure the summary plot window is visible
RiuPlotMainWindowTools::showPlotMainWindow();
}
return curve;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellLogFileCurve* RicWellLogTools::addFileCurve(RimWellLogTrack* plotTrack)
RimWellLogFileCurve* RicWellLogTools::addFileCurve(RimWellLogTrack* plotTrack, bool showPlotWindow)
{
CVF_ASSERT(plotTrack);
@@ -312,8 +325,15 @@ RimWellLogFileCurve* RicWellLogTools::addFileCurve(RimWellLogTrack* plotTrack)
plotTrack->updateConnectedEditors();
RiuPlotMainWindowTools::showPlotMainWindow();
RiaApplication::instance()->project()->updateConnectedEditors();
RiaApplication::instance()->getOrCreateMainPlotWindow();
RiuPlotMainWindowTools::selectAsCurrentItem(curve);
if (showPlotWindow)
{
// Make sure the summary plot window is visible
RiuPlotMainWindowTools::showPlotMainWindow();
}
return curve;
}