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?p=simantics%2Fplatform.git;a=commitdiff_plain;h=fe30e5d556ee0c792de220bccbb9ec57f4085779;hp=-c OpenDefaultEditor should not cache adapters that cannot be opened #7252 Change-Id: Idf1a4e15fd808c540934dbfc6bc75d5b72016a1b --- fe30e5d556ee0c792de220bccbb9ec57f4085779 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()); }