From: Antti Villberg Date: Mon, 29 May 2017 12:05:28 +0000 (+0300) Subject: OpenDefaultEditor should not cache adapters that cannot be opened X-Git-Tag: v1.29.0~14 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F69%2F569%2F2;p=simantics%2Fplatform.git OpenDefaultEditor should not cache adapters that cannot be opened #7252 Change-Id: Idf1a4e15fd808c540934dbfc6bc75d5b72016a1b --- diff --git a/bundles/org.simantics.ui/src/org/simantics/ui/workbench/editor/OpenDefaultEditor.java b/bundles/org.simantics.ui/src/org/simantics/ui/workbench/editor/OpenDefaultEditor.java index 4e75611e0..341fbf3a6 100644 --- a/bundles/org.simantics.ui/src/org/simantics/ui/workbench/editor/OpenDefaultEditor.java +++ b/bundles/org.simantics.ui/src/org/simantics/ui/workbench/editor/OpenDefaultEditor.java @@ -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()); }