#1321 Made zoom all and snapshot work

This commit is contained in:
Jacob Støren 2017-03-28 23:30:01 +02:00
parent a6ce3c9ef4
commit 960e6833c4
2 changed files with 22 additions and 0 deletions

View File

@ -49,6 +49,7 @@
#include "RimEclipseWellCollection.h"
#include "RimFaultCollection.h"
#include "RimFormationNamesCollection.h"
#include "RimFlowCharacteristicsPlot.h"
#include "RimGeoMechCase.h"
#include "RimGeoMechCellColors.h"
#include "RimGeoMechModels.h"
@ -83,6 +84,7 @@
#include "RiuViewer.h"
#include "RiuWellLogPlot.h"
#include "RiuWellAllocationPlot.h"
#include "RiuFlowCharacteristicsPlot.h"
#include "RicImportSummaryCaseFeature.h"
#include "RicSnapshotViewToClipboardFeature.h"
@ -1648,6 +1650,12 @@ RimViewWindow* RiaApplication::activeViewWindow()
{
viewWindow = wellAllocationPlot->ownerPlotDefinition();
}
RiuFlowCharacteristicsPlot* flowCharacteristicsPlot = dynamic_cast<RiuFlowCharacteristicsPlot*>(subwindows.back()->widget());
if (flowCharacteristicsPlot)
{
viewWindow = flowCharacteristicsPlot->ownerPlotDefinition();
}
}
}

View File

@ -35,6 +35,8 @@
#include <QAction>
#include <QClipboard>
#include <QMdiSubWindow>
#include "RiuFlowCharacteristicsPlot.h"
#include "RimFlowCharacteristicsPlot.h"
CAF_CMD_SOURCE_INIT(RicViewZoomAllFeature, "RicViewZoomAllFeature");
@ -100,6 +102,18 @@ void RicViewZoomAllFeature::onActionTriggered(bool isChecked)
return;
}
}
{
RiuFlowCharacteristicsPlot* flowCharPlot = dynamic_cast<RiuFlowCharacteristicsPlot*>(subwindows.back()->widget());
if (flowCharPlot)
{
RimFlowCharacteristicsPlot* viewWindow = flowCharPlot->ownerPlotDefinition();
viewWindow->zoomAll();
flowCharPlot->update();
return;
}
}
}
}
}