]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.district.selection.ui/src/org/simantics/district/selection/ui/ElementSelectionTools.java
Optimization of district scene graph node rendering
[simantics/district.git] / org.simantics.district.selection.ui / src / org / simantics / district / selection / ui / ElementSelectionTools.java
index 130e3f4f3550d8e98dc5b9795743dba56a6d867a..33a428f41e71fddb25a729aed13b5467aa8f2fed 100644 (file)
@@ -37,8 +37,9 @@ public class ElementSelectionTools {
                                return (T)element;
                        }
                        else if (contentType instanceof AnyVariable) {
+                               AnyVariable type = (AnyVariable) contentType;
                                try {
-                                       return (T) Simantics.getSession().syncRequest(new ResourceRead<Variable>(element) {
+                                       return (T) type.processor.syncRequest(new ResourceRead<Variable>(element) {
                                                public Variable perform(ReadGraph graph) throws DatabaseException {
                                                        return ElementSelector.getVariableForElement(graph, resource);
                                                }