]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.ui/src/org/simantics/ui/workbench/editor/OpenDefaultEditor.java
OpenDefaultEditor should not cache adapters that cannot be opened
[simantics/platform.git] / bundles / org.simantics.ui / src / org / simantics / ui / workbench / editor / OpenDefaultEditor.java
index 4e75611e03bf4515d57f7b08ce3a6b4f5a84612b..341fbf3a60381ec81cff0efb110fa9b7bad2c69c 100644 (file)
@@ -46,7 +46,7 @@ public class OpenDefaultEditor implements IDoubleClickAction {
                         protected void safeRun() throws Exception {
                             super.safeRun();
 
-                            if (rememberChoice) {
+                            if (rememberChoice && a.getPriority() >= 0) {
                                 // Make this choice the default for the next time.
                                 EditorRegistry.getInstance().getMappings().put(getResource(), getAdapter());
                             }