#18381 closed enhancement (fixed)
[PATCH] Don't require a restart when a Tagging Preset is added/removed
Reported by: | taylor.smock | Owned by: | Don-vip |
---|---|---|---|
Priority: | normal | Milestone: | 19.12 |
Component: | Core | Version: | |
Keywords: | restart, preset | Cc: |
Description
It would be nice to not have to restart after adding a preset.
Attachments (5)
Change History (21)
by , 5 years ago
Attachment: | 18381.patch added |
---|
comment:1 by , 5 years ago
Milestone: | → 19.12 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:3 by , 5 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This will not work with TagChecker
as it builds internal data structures based on the TaggingPresets, but only when method initialize()
is called.
by , 5 years ago
Attachment: | 18381.1.patch added |
---|
Implement TaggingPresetListener
in TagChecker
and register itself as a listener with TaggingPresets
follow-up: 6 comment:4 by , 5 years ago
@taylor.smock: Did you check all the other sources which use e.g. TaggingPresets.getTaggingPresets()
?
Sorry, I should have asked this before...
comment:5 by , 5 years ago
JOSM core:
: implements TaggingPresetListener alreadysrc/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetNameTemplateList.java
: 18381.2.patch (only constructed once, and then stored)src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelector.java
: It looks like a transient check to me (i.e., does a preset currently exist?)src/org/openstreetmap/josm/gui/tagging/presets/items/PresetLink.java
: I don't think this needs anythingsrc/org/openstreetmap/josm/data/osm/search/SearchCompiler.java
: 18381.2.patchsrc/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
: 18381.1.patchsrc/org/openstreetmap/josm/data/validation/tests/TagChecker.java
Plugins:
surveyor/src/org/openstreetmap/josm/plugins/surveyor/action/TaggingPresetAction.java
: Doesn't look like an issue (not cached)
: Needs worktageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/ui/TabularPresetSelector.java
I made the incorrect assumption that anything that needed to listen to changes to TaggingPresets already implemented a listener.
by , 5 years ago
Attachment: | 18381.2.patch added |
---|
Modify JOSM classes to implement a TaggingPresetListener
, where appropriate
comment:6 by , 5 years ago
Replying to GerdP:
@taylor.smock: Did you check all the other sources which use e.g.
TaggingPresets.getTaggingPresets()
?
Sorry, I should have asked this before...
I think I got everything that is in the JOSM repository.
comment:7 by , 5 years ago
I agree reg. core, not sure about plugin surveyor. It seems to store a preset in field preset
?
comment:9 by , 5 years ago
It does store the preset in a field, but it seemed to me that it was more of an initialization check. If I were to modify that class, I'd probably just check if the reset still exists.
That being said, does anyone still use the plugin? I installed it and then went to GPS
-> surveyor
, and it promptly crashed on me when I tried to use it (see #18412). I fixed that issue, but another one popped up.
comment:10 by , 5 years ago
I've never used surveyor, but it appears in some recent error reports, so it is installed by some users. Whatever that means.
comment:12 by , 5 years ago
I believe it is fixed for core.
I need to make some changes to the surveyor plugin (as in, actually get it working), and then check and see if it needs to have a TaggingPresetListener
. I'll file a separate bug for that, since it seems like it is going be more work.
I should probably make a separate bug for tageditor (see 18381.tageditor.patch, which I don't think has been applied yet).
comment:13 by , 5 years ago
Ah, sorry, forgot about 18381.tageditor.patch. I think in destroy() a super.destroy() is missing?
comment:15 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Add logic to destroy the preset menu and to rebuild it when the preset sources change