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

This commit is contained in:
Jacob Støren committed 2015-10-23 14:32:38 +02:00
1 parent f50f5e3253
commit 4de95c2092
1 file changed
+15 -1
@@ -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;
}
//--------------------------------------------------------------------------------------------------