mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 09:22:13 -05:00
(#578) Controlled views: Disabled the range filter commands in the treeview
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user