#1380 Major refactor of the management of views to fix the active view problem. Expect some trouble following this.

This commit is contained in:
Jacob Støren
2017-03-31 15:10:39 +02:00
parent a914e38d53
commit 442d9d2e41
14 changed files with 123 additions and 297 deletions

View File

@@ -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();
}
}
}