Fix problem where Well Log Plot looks in main window instead of plot window for MDI child windows.

This commit is contained in:
Gaute Lindkvist
2018-06-29 11:29:18 +02:00
parent 62279d7a43
commit 5bc59c1ee9

View File

@@ -19,11 +19,14 @@
#include "RiuWellLogPlot.h"
#include "RiaApplication.h"
#include "RimContextCommandBuilder.h"
#include "RimWellLogPlot.h"
#include "RimWellLogTrack.h"
#include "RiuMainWindow.h"
#include "RiuPlotMainWindow.h"
#include "RiuWellLogTrack.h"
#include "cafSelectionManager.h"
@@ -166,7 +169,8 @@ void RiuWellLogPlot::removeTrackPlot(RiuWellLogTrack* trackPlot)
//--------------------------------------------------------------------------------------------------
void RiuWellLogPlot::modifyWidthOfContainingMdiWindow(int widthChange)
{
QMdiSubWindow* mdiWindow = RiuMainWindow::instance()->findMdiSubWindow(this);
RiuPlotMainWindow* plotWindow = RiaApplication::instance()->getOrCreateMainPlotWindow();
QMdiSubWindow* mdiWindow = plotWindow->findMdiSubWindow(this);
if (mdiWindow)
{
if (m_trackPlots.size() == 0 && widthChange <= 0) return; // Last track removed. Leave be