mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1358 Added support for "Zoom All" of well alloc plots
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -491,6 +491,7 @@ QWidget* RimWellAllocationPlot::viewWidget()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellAllocationPlot::zoomAll()
|
||||
{
|
||||
m_accumulatedWellFlowPlot()->zoomAll();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user