mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#446) "Link view" only available if linked views exist
This commit is contained in:
parent
ae1cc96979
commit
d377de562a
@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
#include "RimView.h"
|
#include "RimView.h"
|
||||||
|
#include "RimViewLinkerCollection.h"
|
||||||
|
#include "RimViewLinker.h"
|
||||||
|
|
||||||
#include "cafSelectionManager.h"
|
#include "cafSelectionManager.h"
|
||||||
|
|
||||||
@ -43,7 +45,18 @@ bool RicLinkViewFeature::isCommandEnabled()
|
|||||||
RimProject* proj = RiaApplication::instance()->project();
|
RimProject* proj = RiaApplication::instance()->project();
|
||||||
if (!proj->findViewLinkerFromView(activeView))
|
if (!proj->findViewLinkerFromView(activeView))
|
||||||
{
|
{
|
||||||
return true;
|
RimViewLinkerCollection* viewLinkerCollection = proj->viewLinkerCollection();
|
||||||
|
if (viewLinkerCollection)
|
||||||
|
{
|
||||||
|
RimViewLinker* viewLinker = viewLinkerCollection->viewLinker();
|
||||||
|
if (viewLinker)
|
||||||
|
{
|
||||||
|
if (viewLinker->viewLinks().size() > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user