Browse files

FIx issue #516

  • Loading branch information...
1 parent 3e8608d commit 9d882c437c5cd71ab148efff719d0691f74f9541 @mbastian committed Mar 3, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 FiltersImpl/src/org/gephi/filters/FilterControllerImpl.java
View
16 FiltersImpl/src/org/gephi/filters/FilterControllerImpl.java
@@ -183,6 +183,22 @@ public void rename(Query query, String name) {
}
public void setSubQuery(Query query, Query subQuery) {
+ //Init subquery when new filter
+ if (subQuery.getParent() == null && subQuery != model.getCurrentQuery()) {
+ Graph graph = null;
+ if (model != null && model.getGraphModel() != null) {
+ graph = model.getGraphModel().getGraph();
+ } else {
+ GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getModel();
+ graph = graphModel.getGraph();
+ }
+ Filter filter = subQuery.getFilter();
+ if (filter instanceof NodeFilter || filter instanceof EdgeFilter || filter instanceof AttributableFilter) {
+ FilterProcessor filterProcessor = new FilterProcessor();
+ filterProcessor.init(filter, graph);
+ }
+ }
+
model.setSubQuery(query, subQuery);
}

0 comments on commit 9d882c4

Please sign in to comment.