Opened 15 months ago
Closed 15 months ago
#7380 closed defect (fixed)
"Angle snapping" repeated entry in Edit menu
| Reported by: | balrog-kun | Owned by: | akks |
|---|---|---|---|
| Priority: | normal | 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 Changed 15 months ago by skyper
- Owner changed from team to balrog-kun
- Status changed from new to needinfo
comment:2 follow-up: ↓ 4 Changed 15 months ago by akks
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 Changed 15 months ago by stoecker
I think DrawAction is reconstructed every time a new MainFrame is created.
comment:4 in reply to: ↑ 2 Changed 15 months ago by skyper
comment:5 Changed 15 months ago by balrog-kun
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 Changed 15 months ago by balrog-kun
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 Changed 15 months ago by akks
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 Changed 15 months ago by skyper
- Owner changed from balrog-kun to akks
- Status changed from needinfo to new
comment:8 Changed 15 months ago by akks
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 Changed 15 months ago by akks
Reproduced it and tried to fix (simply removed all our old items before creating new one). Seems to work.
comment:10 Changed 15 months ago by akks
- Resolution set to fixed
- Status changed from new to closed
In 4924/josm:



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)