From ed512057d243de5830069e9a72ed8dd1f22385ab Mon Sep 17 00:00:00 2001 From: miettinen Date: Wed, 12 Jun 2013 07:27:26 +0000 Subject: [PATCH] Remove under right mouse button for AbstractChart (refs #4330). Bugfix for removing line and sensitivity charts. git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@27528 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../chart/properties/AllVariablesOfModel.java | 4 +++- org.simantics.sysdyn.ui/plugin.xml | 10 +--------- .../simantics/sysdyn/ui/trend/SensitivityDataset.java | 2 ++ 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/properties/AllVariablesOfModel.java b/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/properties/AllVariablesOfModel.java index 90ac3d69..f64435be 100644 --- a/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/properties/AllVariablesOfModel.java +++ b/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/properties/AllVariablesOfModel.java @@ -1,6 +1,7 @@ package org.simantics.jfreechart.chart.properties; import java.util.Collection; +import java.util.Collections; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; @@ -17,9 +18,10 @@ public class AllVariablesOfModel implements Read> { @Override public Collection perform(ReadGraph graph) throws DatabaseException { + if(!graph.hasStatement(res)) + return Collections.emptyList(); IAllVariablesOfModel query = graph.adapt(res, IAllVariablesOfModel.class); return graph.syncRequest(query.getVariablesQuery()); - } } diff --git a/org.simantics.sysdyn.ui/plugin.xml b/org.simantics.sysdyn.ui/plugin.xml index 3ca2664a..df68d180 100644 --- a/org.simantics.sysdyn.ui/plugin.xml +++ b/org.simantics.sysdyn.ui/plugin.xml @@ -1529,15 +1529,7 @@ property="org.simantics.sysdyn.ui.nodeClass"> - - - -