From cbdc313cf38be548d5cb14ca732e10407db31337 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Wed, 5 Oct 2016 11:55:54 +0200 Subject: [PATCH] #846 Do not force display of plot main window from well log plots and track --- ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp | 3 ++- ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp b/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp index 3162f9a8d9..f207f42c57 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp @@ -101,7 +101,8 @@ RimWellLogPlot::~RimWellLogPlot() //-------------------------------------------------------------------------------------------------- void RimWellLogPlot::updateViewerWidget() { - RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow(); + RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->mainPlotWindow(); + if (!mainPlotWindow) return; if (m_showWindow()) { diff --git a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp index 428887f718..c69c291c65 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp @@ -236,11 +236,9 @@ void RimWellLogTrack::availableDepthRange(double* minimumDepth, double* maximumD //-------------------------------------------------------------------------------------------------- void RimWellLogTrack::loadDataAndUpdate() { - CVF_ASSERT(m_wellLogTrackPlotWidget); - RimWellLogPlot* wellLogPlot; firstAncestorOrThisOfType(wellLogPlot); - if (wellLogPlot) + if (wellLogPlot && m_wellLogTrackPlotWidget) { m_wellLogTrackPlotWidget->setDepthTitle(wellLogPlot->depthPlotTitle()); }