Modify

Opened 8 years ago

Closed 8 years ago

#7213 closed defect (fixed)

strange shortcut fuckup

Reported by: Cobra Owned by: team
Priority: major Milestone:
Component: Core Version:
Keywords: template_report shortcuts Cc:

Description

What steps will reproduce the problem?

  1. notice that some shortcut was changed automagically
  2. open preferences to reset it, see that the old shortcut is assigned to an empty action
  3. disable all empty actions, restart
  4. load data (from API or from file)

What is the expected result?

Data is loaded

What happens instead?

This error, no data is loaded

Please provide any additional information below. Attach a screenshot if
possible.

After getting this error I reset the empty actions to "default" and restarted. Now josm works again and the empty actions are gone. But when closing the preferences window, it tells me that josm needs to be restarted for some settings to take effect (without changing anything!). After doing so the empty actions appear again, but with different shortcuts assigned (see screenshot).

This happened after updating from r4755 to r4756 this morning.

Assigning shortcuts to empty actions is senseless. If there is a shortcut, but the assigned action isn't present anymore, delete it.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2012-01-01 02:31:59
Last Changed Author: jttt
Revision: 4756
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2011-12-31 15:00:49 +0100 (Sat, 31 Dec 2011)
Last Changed Rev: 4756

Identification: JOSM/1.5 (4756 en)
Memory Usage: 210 MB / 910 MB (112 MB allocated, but free)
Java version: 1.6.0_30, Sun Microsystems Inc., Java HotSpot(TM) 64-Bit Server VM
Operating system: Linux

Plugin: FastDraw (27355)
Plugin: FixAddresses (27357)
Plugin: ImportImagePlugin (27354)
Plugin: ImproveWayAccuracy (27289)
Plugin: InfoMode (27355)
Plugin: PicLayer (27355)
Plugin: alignways (27355)
Plugin: licensechange (27359)
Plugin: measurement (27289)
Plugin: openstreetbugs (27355)
Plugin: openvisible (27289)
Plugin: pdfimport (27355)
Plugin: proj4j (27289)
Plugin: reverter (27159)
Plugin: terracer (27289)
Plugin: undelete (27243)
Plugin: utilsplugin2 (27355)

java.lang.IllegalArgumentException: Action must have shortcut set
	at org.openstreetmap.josm.tools.MultikeyActionsHandler.addAction(MultikeyActionsHandler.java:204)
	at org.openstreetmap.josm.gui.dialogs.LayerListDialog.createInstance(LayerListDialog.java:93)
	at org.openstreetmap.josm.gui.MapFrame.<init>(MapFrame.java:192)
	at org.openstreetmap.josm.Main.addLayer(Main.java:323)
	at org.openstreetmap.josm.io.OsmImporter$1.run(OsmImporter.java:57)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646)
	at java.awt.EventQueue.access$000(EventQueue.java:84)
	at java.awt.EventQueue$1.run(EventQueue.java:607)
	at java.awt.EventQueue$1.run(EventQueue.java:605)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:616)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
	at java.awt.Dialog$1.run(Dialog.java:1044)
	at java.awt.Dialog$3.run(Dialog.java:1096)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.Dialog.show(Dialog.java:1094)
	at java.awt.Component.show(Component.java:1584)
	at java.awt.Component.setVisible(Component.java:1536)
	at java.awt.Window.setVisible(Window.java:841)
	at java.awt.Dialog.setVisible(Dialog.java:984)
	at org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor$4.run(PleaseWaitProgressMonitor.java:163)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646)
	at java.awt.EventQueue.access$000(EventQueue.java:84)
	at java.awt.EventQueue$1.run(EventQueue.java:607)
	at java.awt.EventQueue$1.run(EventQueue.java:605)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:616)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122

Attachments (1)

Screenshot-Preferences.png (92.5 KB) - added by Cobra 8 years ago.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by Cobra

Attachment: Screenshot-Preferences.png added

comment:1 Changed 8 years ago by Cobra

Keywords: shortcuts added

comment:2 Changed 8 years ago by akks

Empty actions corresponds to multikey actions, all shortcuts created like this:

Shortcut.registerShortcut("core_multikey:previousMarker", "", 'P', Shortcut.GROUP_DIRECT, KeyEvent.ALT_DOWN_MASK +KeyEvent.CTRL_DOWN_MASK) 

We need to add some names for configuration, something like

Shortcut.registerShortcut("core_multikey:previousMarker", tr("Previos marker [multikey]"), 'P', Shortcut.GROUP_DIRECT, KeyEvent.ALT_DOWN_MASK + KeyEvent.CTRL_DOWN_MASK)

it works for me, names appear in the list, but changing is broken sometimes - especially after sorting.

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

comment:3 Changed 8 years ago by akks

Tried to fix it in [4766/josm], please check before closing the ticket.

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

comment:4 Changed 8 years ago by akks

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.