Skip to content

Commit

Permalink
(#446) "Link view" only available if linked views exist
Browse files Browse the repository at this point in the history
  • Loading branch information
palhagen committed Sep 22, 2015
1 parent ae1cc96 commit d377de5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion ApplicationCode/Commands/ViewLink/RicLinkViewFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

#include "RimProject.h"
#include "RimView.h"
#include "RimViewLinkerCollection.h"
#include "RimViewLinker.h"

#include "cafSelectionManager.h"

Expand All @@ -43,7 +45,18 @@ bool RicLinkViewFeature::isCommandEnabled()
RimProject* proj = RiaApplication::instance()->project();
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;
Expand Down

0 comments on commit d377de5

Please sign in to comment.