Skip to content

Commit

Permalink
Fixed bug in FeatureModelEditPolicy.
Browse files Browse the repository at this point in the history
* was possible to invoke GroupFeaturesCommand on orphaned features.
  • Loading branch information
jpikl committed Feb 1, 2013
1 parent 9fa5685 commit 5a6412a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ private Command createGroupFeaturesCommand(List<?> selectedEditParts, boolean xo
EObject commonParent = null;
for(Feature feature: features) {
EObject parent = feature.getParent();
if(parent == null)
return null;
if(parent instanceof Group)
parent = ((Group) parent).getParent();
if(!(parent instanceof Feature))
return null;
if(commonParent == null)
commonParent = parent;
else if(parent != commonParent)
Expand Down

0 comments on commit 5a6412a

Please sign in to comment.