mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1380 Major refactor of the management of views to fix the active view problem. Expect some trouble following this.
This commit is contained in:
@@ -66,53 +66,11 @@ void RicViewZoomAllFeature::onActionTriggered(bool isChecked)
|
||||
QList<QMdiSubWindow*> subwindows = mainPlotWindow->subWindowList(QMdiArea::StackingOrder);
|
||||
if (subwindows.size() > 0)
|
||||
{
|
||||
RimViewWindow* viewWindow = RiuInterfaceToViewWindow::viewWindowFromWidget(subwindows.back()->widget());
|
||||
|
||||
if (viewWindow)
|
||||
{
|
||||
RiuSummaryQwtPlot* summaryQwtPlot = dynamic_cast<RiuSummaryQwtPlot*>(subwindows.back()->widget());
|
||||
if (summaryQwtPlot)
|
||||
{
|
||||
RimViewWindow* viewWindow = summaryQwtPlot->ownerPlotDefinition();
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
RiuFlowCharacteristicsPlot* flowCharPlot = dynamic_cast<RiuFlowCharacteristicsPlot*>(subwindows.back()->widget());
|
||||
if (flowCharPlot)
|
||||
{
|
||||
RimFlowCharacteristicsPlot* viewWindow = flowCharPlot->ownerPlotDefinition();
|
||||
viewWindow->zoomAll();
|
||||
flowCharPlot->update();
|
||||
|
||||
return;
|
||||
}
|
||||
viewWindow->zoomAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user