mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#578) Controlled views: Disabled the range filter commands in the treeview
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user