#1358 Added support for "Zoom All" of well alloc plots

This commit is contained in:
Magne Sjaastad
2017-03-24 12:10:05 +01:00
parent 03741fd7da
commit 40d5150b37
2 changed files with 33 additions and 10 deletions

View File

@@ -23,11 +23,13 @@
#include "RimSummaryPlot.h"
#include "RimView.h"
#include "RimViewWindow.h"
#include "RimWellAllocationPlot.h"
#include "RimWellLogPlot.h"
#include "RiuMainPlotWindow.h"
#include "RiuMainWindow.h"
#include "RiuSummaryQwtPlot.h"
#include "RiuWellAllocationPlot.h"
#include "RiuWellLogPlot.h"
#include <QAction>
@@ -61,6 +63,7 @@ void RicViewZoomAllFeature::onActionTriggered(bool isChecked)
RiuMainPlotWindow* mainPlotWindow = dynamic_cast<RiuMainPlotWindow*>(topLevelWidget);
QList<QMdiSubWindow*> subwindows = mainPlotWindow->subWindowList(QMdiArea::StackingOrder);
if (subwindows.size() > 0)
{
{
RiuSummaryQwtPlot* summaryQwtPlot = dynamic_cast<RiuSummaryQwtPlot*>(subwindows.back()->widget());
if (summaryQwtPlot)
@@ -69,14 +72,33 @@ void RicViewZoomAllFeature::onActionTriggered(bool isChecked)
viewWindow->zoomAll();
summaryQwtPlot->replot();
return;
}
}
{
RiuWellLogPlot* wellLogPlot = dynamic_cast<RiuWellLogPlot*>(subwindows.back()->widget());
if (wellLogPlot)
{
RimViewWindow* viewWindow = wellLogPlot->ownerPlotDefinition();
viewWindow->zoomAll();
wellLogPlot->update();
return;
}
}
{
RiuWellAllocationPlot* wellAllocationPlot = dynamic_cast<RiuWellAllocationPlot*>(subwindows.back()->widget());
if (wellAllocationPlot)
{
RimWellAllocationPlot* viewWindow = wellAllocationPlot->ownerPlotDefinition();
viewWindow->zoomAll();
wellAllocationPlot->update();
return;
}
}
}
}

View File

@@ -491,6 +491,7 @@ QWidget* RimWellAllocationPlot::viewWidget()
//--------------------------------------------------------------------------------------------------
void RimWellAllocationPlot::zoomAll()
{
m_accumulatedWellFlowPlot()->zoomAll();
}
//--------------------------------------------------------------------------------------------------