]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
OpenDefaultEditor should not cache adapters that cannot be opened 69/569/2
authorAntti Villberg <antti.villberg@semantum.fi>
Mon, 29 May 2017 12:05:28 +0000 (15:05 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 29 May 2017 12:47:04 +0000 (15:47 +0300)
#7252

Change-Id: Idf1a4e15fd808c540934dbfc6bc75d5b72016a1b

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());
                             }