diff --git a/ApplicationCode/Commands/ViewLink/RicSetMasterViewFeature.cpp b/ApplicationCode/Commands/ViewLink/RicSetMasterViewFeature.cpp index 4ccd95f370..f22208abeb 100644 --- a/ApplicationCode/Commands/ViewLink/RicSetMasterViewFeature.cpp +++ b/ApplicationCode/Commands/ViewLink/RicSetMasterViewFeature.cpp @@ -30,6 +30,7 @@ #include "Riu3DMainWindowTools.h" +#include "RimGeoMechContourMapView.h" #include #include @@ -42,23 +43,13 @@ bool RicSetMasterViewFeature::isCommandEnabled() { RimGridView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView(); if ( !activeView ) return false; + if ( dynamic_cast( activeView ) != nullptr ) return false; + if ( dynamic_cast( activeView ) != nullptr ) return false; - RimProject* proj = RiaApplication::instance()->project(); RimViewLinker* viewLinker = activeView->assosiatedViewLinker(); - if ( viewLinker && viewLinker->masterView() == activeView ) - { - return false; - } - if ( !proj->viewLinkerCollection()->viewLinker() ) - { - return false; - } - - if ( dynamic_cast( activeView ) != nullptr ) - { - return false; - } + if ( !viewLinker ) return false; + if ( viewLinker->masterView() == activeView ) return false; return true; }