(#578) Controlled views: Disabled the range filter commands in the treeview

This commit is contained in:
Jacob Støren
2015-10-23 14:28:21 +02:00
parent f50f5e3253
commit 4de95c2092

View File

@@ -26,13 +26,27 @@
#include "cafSelectionManager.h"
#include <vector>
#include "RimView.h"
#include "RimViewController.h"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicRangeFilterFeatureImpl::isRangeFilterCommandAvailable()
{
return findRangeFilterCollection() != NULL;
RimCellRangeFilterCollection* rangeFilterCollection = findRangeFilterCollection();
if (!rangeFilterCollection) return false;
RimView* view;
rangeFilterCollection->firstAnchestorOrThisOfType(view);
if (view)
{
RimViewController* vc = view->viewController();
if (!vc) return true;
return (!vc->isRangeFiltersControlled());
}
return true;
}
//--------------------------------------------------------------------------------------------------