Modify

Opened 8 years ago

Closed 8 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 Changed 8 years ago by skyper

Owner: changed from team to balrog-kun
Status: newneedinfo

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.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2012-02-12 02:32:10
Last Changed Author: simon04
Revision: 4918
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2012-02-11 18:56:53 +0100 (Sat, 11 Feb 2012)
Last Changed Rev: 4918

Identification: JOSM/1.5 (4918 en)
Memory Usage: 27 MB / 508 MB (7 MB allocated, but free)
Java version: 1.6.0_18, Sun Microsystems Inc., OpenJDK Client VM
Operating system: Linux
Dataset consistency test: No problems found

Can you reproduce it with a new/empty preference directory ? (See:Help/ResetPreferences)

comment:2 Changed 8 years 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?

Last edited 8 years ago by akks (previous) (diff)

comment:3 Changed 8 years ago by stoecker

I think DrawAction is reconstructed every time a new MainFrame is created.

comment:4 in reply to:  2 Changed 8 years ago by skyper

Replying to akks:

Can you please upload preferences.xml which gives the effect?

Sorry, works now (probably missed the icon).

As for my prefs:
It happened only on first start of r4918. Was a self-heeling problem, after one restart it works with r4918 (sorry, no backups of preferences.xml).

comment:5 Changed 8 years 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)

Last edited 8 years ago by balrog-kun (previous) (diff)

comment:5 Changed 8 years 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 8 years 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.

Last edited 8 years ago by akks (previous) (diff)

comment:7 Changed 8 years ago by skyper

Owner: changed from balrog-kun to akks
Status: needinfonew

comment:8 Changed 8 years 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 8 years ago by akks

Reproduced it and tried to fix (simply removed all our old items before creating new one). Seems to work.

Last edited 8 years ago by akks (previous) (diff)

comment:10 Changed 8 years ago by akks

Resolution: fixed
Status: newclosed

In 4924/josm:

fix #7380: "Angle snapping" repeated entry in Edit menu

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain akks.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.