#2102 Statistics dialog. Support for geo mech data

This commit is contained in:
Bjørn Erik Jensen
2017-11-16 14:13:50 +01:00
parent 985388e60f
commit d9a4288693
5 changed files with 234 additions and 139 deletions

View File

@@ -24,6 +24,7 @@
#include "RimProject.h"
#include "Rim3dOverlayInfoConfig.h"
#include "RimEclipseView.h"
#include "RimGeoMechView.h"
#include "cafSelectionManagerTools.h"
@@ -47,11 +48,16 @@ bool RicShowGridStatisticsFeature::isCommandEnabled()
void RicShowGridStatisticsFeature::onActionTriggered(bool isChecked)
{
auto eclipseView = caf::firstAncestorOfTypeFromSelectedObject<RimEclipseView*>();
auto geoMechView = caf::firstAncestorOfTypeFromSelectedObject<RimGeoMechView*>();
if (eclipseView && eclipseView->overlayInfoConfig())
{
eclipseView->overlayInfoConfig()->showStatisticsInfoDialog();
}
else if (geoMechView && geoMechView->overlayInfoConfig())
{
geoMechView->overlayInfoConfig()->showStatisticsInfoDialog();
}
}
//--------------------------------------------------------------------------------------------------