Opened 5 years ago

Last modified 4 years ago

#20227 new defect

[Patch] Presets not displayed when creating new relation — at Initial Version

Reported by: michael2402 Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:

Description

When creating a new relation, presets are not displayed. One needs to close the relation dialog and re-open it.

I guess that this is because in org.openstreetmap.josm.gui.tagging.TagEditorModel#getTaggingPresetTypes, primitive is null.

I cannot test it, since ant run wont work for me (does not compile, some dependecy problems I dont want to dig into now), but this should fix it:

Index: src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java      (Revision 17404)
+++ src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java      (Arbeitskopie)
@@ -381,7 +381,7 @@
         }
 
         public void run() {
-            RelationEditor.getEditor(MainApplication.getLayerManager().getEditLayer(), null, null).setVisible(true);
+            RelationEditor.getEditor(MainApplication.getLayerManager().getEditLayer(), new Relation(), null).setVisible(true);
         }
 
         @Override

Change History (3)

by michael2402, 5 years ago

Before fix

by michael2402, 5 years ago

Before fix - re-open

by michael2402, 5 years ago

after fix, new relation

Note: See TracTickets for help on using tickets.