Opened 13 years ago
Closed 13 years ago
#7380 closed defect (fixed)
"Angle snapping" repeated entry in Edit menu
Reported by: | balrog-kun | Owned by: | akks |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | tested |
Keywords: | Cc: |
Description
This may be a MacOS X problem, but not sure.
The "Angle snapping" entry appeared 4 times in the Edit menu when I first started r4878. First two entries were grayed out, third didn't work, the fourth did.
Now it appears five times (after restart), first two and the last two are grayed out, only the middle entry is selectable.
Attachments (0)
Change History (11)
comment:1 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
follow-up: 4 comment:2 by , 13 years ago
Hm, strange. How can it appear? Menu item is added in DrawAction constructor with code
snapCheckboxMenuItem = MainMenu.addWithCheckbox(Main.main.menu.editMenu, new SnapChangeAction(), MainMenu.WINDOW_MENU_GROUP.VOLATILE);
Can you please upload preferences.xml which gives the effect?
comment:3 by , 13 years ago
I think DrawAction is reconstructed every time a new MainFrame is created.
comment:4 by , 13 years ago
comment:5 by , 13 years ago
I could only try r4878, sorry. Restarting removes all the "Angle snapping" entries, and every time the map view is created another new entry is added. So for example if I start a fresh JOSM instance, and create some layers, then delete them, a single "Angle snapping" entry appears. If I delete all layers 5 times, I get five "Angle snapping" entries.
Happens with default preferences.xml too.
By the way, today when creating a new layer it showed me a "downloading CT-agreeing users list" with a "Cancel" button, but the button didn't work. (Strange thing, I hit "Submit" on this comment twice by accident, and now it shows "comment:5" twice in the trac ticket, but they cannot be edited individually -- probably because of identical Id)
comment:5 by , 13 years ago
I could only try r4878, sorry. Restarting removes all the "Angle snapping" entries, and every time the map view is created another new entry is added. So for example if I start a fresh JOSM instance, and create some layers, then delete them, a single "Angle snapping" entry appears. If I delete all layers 5 times, I get five "Angle snapping" entries.
Happens with default preferences.xml too.
comment:6 by , 13 years ago
Replying to stoecker:
I think DrawAction is reconstructed every time a new MainFrame is created.
Thank you!
OK, it seems I know how to fix it. Maybe tomorrow.
comment:7 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | needinfo → new |
comment:8 by , 13 years ago
Sorry, I do not know the right place to initialize menu item.
It can not work without DrawAction, but DrawAction is reconstructed some times...
Remove old element before adding new?...
comment:9 by , 13 years ago
Reproduced it and tried to fix (simply removed all our old items before creating new one). Seems to work.
I just had three lines of this entry with only the middle one selectable.
With a new preference directory, all these entries seems to be gone. Note: There have been changes on angle snapping settings the last days.
Can you reproduce it with a new/empty preference directory ? (See:Help/ResetPreferences)