Made new summary curve (filter) possible to start on siblings

This commit is contained in:
Jacob Støren 2016-11-17 17:37:56 +01:00
parent bb2a1751c8
commit 92e4fd462d
2 changed files with 10 additions and 6 deletions

View File

@ -101,7 +101,9 @@ void RicNewSummaryCurveFeature::setupActionLook(QAction* actionToSetup)
//--------------------------------------------------------------------------------------------------
RimSummaryPlot* RicNewSummaryCurveFeature::selectedSummaryPlot() const
{
std::vector<RimSummaryPlot*> selection;
caf::SelectionManager::instance()->objectsByType(&selection);
return selection.size() > 0 ? selection[0] : NULL;
caf::PdmObject* selObj = dynamic_cast<caf::PdmObject*>(caf::SelectionManager::instance()->selectedItem());
RimSummaryPlot * sumPlot;
selObj->firstAncestorOrThisOfType(sumPlot);
return sumPlot;
}

View File

@ -91,7 +91,9 @@ void RicNewSummaryCurveFilterFeature::setupActionLook(QAction* actionToSetup)
//--------------------------------------------------------------------------------------------------
RimSummaryPlot* RicNewSummaryCurveFilterFeature::selectedSummaryPlot() const
{
std::vector<RimSummaryPlot*> selection;
caf::SelectionManager::instance()->objectsByType(&selection);
return selection.size() > 0 ? selection[0] : NULL;
caf::PdmObject* selObj = dynamic_cast<caf::PdmObject*>(caf::SelectionManager::instance()->selectedItem());
RimSummaryPlot * sumPlot;
selObj->firstAncestorOrThisOfType(sumPlot);
return sumPlot;
}