Modify

Opened 5 years ago

Last modified 5 years ago

#18855 new defect

Clicking twice required to delete attribute when using alt to select multipolygon

Reported by: Geimas5 Owned by: team
Priority: normal Milestone:
Component: Core Version: tested
Keywords: Windows ALT Cc: simon04, Don-vip

Description

Steps to reproduce:

  • Create a multipolygon with a few attributes.
  • Unselect the multipolygon
  • Hold ALT and click on a way in that relation until the relation become selected.
  • As soon as the relation is selected, try to immediately press the "Delete" button under "Tags/Memberships" to delete an attribute.

What happens:

  • Its necessary to press the delete button twice for the button to react.

Attachments (1)

18855-debug.patch (1.0 KB ) - added by GerdP 5 years ago.
patch to help setting a break point in Eclipse

Download all attachments as: .zip

Change History (10)

comment:1 by Don-vip, 5 years ago

Keywords: relation added
Owner: changed from team to Geimas5
Status: newneedinfo

Can't reproduce, work fine for me. Please attach your status report.

comment:2 by GerdP, 5 years ago

I was able to reproduce, but found no fix. Two different threads are calling updateEnabledState, one results in false, another in true. In the given scenario the one with false comes later most of the times.

comment:3 by Don-vip, 5 years ago

Can you please share the two stacktraces?

by GerdP, 5 years ago

Attachment: 18855-debug.patch added

patch to help setting a break point in Eclipse

comment:4 by GerdP, 5 years ago

Hope this helps. With the attached patch and a breakpoint on the "if (!b)" I get these:

b is false:

PropertiesDialog$DeleteAction.updateEnabledState() line: 1175	
PropertiesDialog$DeleteAction.valueChanged(ListSelectionEvent) line: 1186	
DefaultListSelectionModel.fireValueChanged(int, int, boolean) line: 184	
DefaultListSelectionModel.fireValueChanged(int, int) line: 164	
DefaultListSelectionModel.fireValueChanged() line: 211	
DefaultListSelectionModel.insertIndexInterval(int, int, boolean) line: 632	
JTable.tableRowsInserted(TableModelEvent) line: 4477	
JTable.tableChanged(TableModelEvent) line: 4413	
PropertiesDialog$ReadOnlyTableModel(AbstractTableModel).fireTableChanged(TableModelEvent) line: 296	
PropertiesDialog$ReadOnlyTableModel(AbstractTableModel).fireTableRowsInserted(int, int) line: 231	
PropertiesDialog$ReadOnlyTableModel(DefaultTableModel).insertRow(int, Vector) line: 376	
PropertiesDialog$ReadOnlyTableModel(DefaultTableModel).addRow(Vector) line: 350	
PropertiesDialog$ReadOnlyTableModel(DefaultTableModel).addRow(Object[]) line: 361	
PropertiesDialog.selectionChanged(DataSelectionListener$SelectionChangeEvent) line: 700	
SelectionEventManager$DataListenerInfo.fire(DataSelectionListener$SelectionChangeEvent) line: 57	
SelectionEventManager.fireEvent(List<ListenerInfo>, SelectionChangeEvent) line: 159	
SelectionEventManager.lambda$0(DataSelectionListener$SelectionChangeEvent) line: 150	
654026360.run() line: not available	
GuiHelper.runInEDTAndWaitWithException(Runnable) line: 239	
SelectionEventManager.selectionChanged(DataSelectionListener$SelectionChangeEvent) line: 150	
DataSet.lambda$20(DataSelectionListener$SelectionChangeEvent, DataSelectionListener) line: 743	
413712215.fire(Object) line: not available	
ListenerList<T>.fireEvent(EventFirerer<T>) line: 156	
DataSet.doSelectionChange(Function<Set<OsmPrimitive>,SelectionChangeEvent>) line: 743	
DataSet.setSelected(Stream<PrimitiveId>) line: 674	
DataSet.setSelected(Collection<PrimitiveId>) line: 665	

b is true:

Thread [AWT-EventQueue-0] (Suspended (breakpoint at line 1175 in PropertiesDialog$DeleteAction))	
	owns: Object  (id=201)	
	PropertiesDialog$DeleteAction.updateEnabledState() line: 1175	
	PropertiesDialog$DeleteAction.valueChanged(ListSelectionEvent) line: 1186	
	DefaultListSelectionModel.fireValueChanged(int, int, boolean) line: 184	
	DefaultListSelectionModel.fireValueChanged(int, int) line: 164	
	DefaultListSelectionModel.fireValueChanged() line: 211	
	DefaultListSelectionModel.changeSelection(int, int, int, int, boolean) line: 405	
	DefaultListSelectionModel.changeSelection(int, int, int, int) line: 415	
	DefaultListSelectionModel.setSelectionInterval(int, int) line: 459	
	JTable.changeSelectionModel(ListSelectionModel, int, boolean, boolean, boolean, int, boolean) line: 2392	
	JTable.changeSelection(int, int, boolean, boolean) line: 2461	
	PropertiesDialog.selectionChanged(DataSelectionListener$SelectionChangeEvent) line: 733	
	SelectionEventManager$DataListenerInfo.fire(DataSelectionListener$SelectionChangeEvent) line: 57	
	SelectionEventManager.fireEvent(List<ListenerInfo>, SelectionChangeEvent) line: 159	
	SelectionEventManager.lambda$0(DataSelectionListener$SelectionChangeEvent) line: 150	
	654026360.run() line: not available	
	GuiHelper.runInEDTAndWaitWithException(Runnable) line: 239	
	SelectionEventManager.selectionChanged(DataSelectionListener$SelectionChangeEvent) line: 150	
	DataSet.lambda$20(DataSelectionListener$SelectionChangeEvent, DataSelectionListener) line: 743	
	413712215.fire(Object) line: not available	
	ListenerList<T>.fireEvent(EventFirerer<T>) line: 156	
	DataSet.doSelectionChange(Function<Set<OsmPrimitive>,SelectionChangeEvent>) line: 743	
	DataSet.setSelected(Stream<PrimitiveId>) line: 674	
	DataSet.setSelected(Collection<PrimitiveId>) line: 665	
	SelectAction.selectPrims(Collection<OsmPrimitive>, boolean, boolean) line: 988	
	SelectAction.mousePressed(MouseEvent) line: 441	
	AWTEventMulticaster.mousePressed(MouseEvent) line: 280	
	MapView(Component).processMouseEvent(MouseEvent) line: 6536	
	MapView(JComponent).processMouseEvent(MouseEvent) line: 3324	
	MapView(Component).processEvent(AWTEvent) line: 6304	
	MapView(Container).processEvent(AWTEvent) line: 2239	
	MapView(Component).dispatchEventImpl(AWTEvent) line: 4889	
	MapView(Container).dispatchEventImpl(AWTEvent) line: 2297	
	MapView(Component).dispatchEvent(AWTEvent) line: 4711	
	LightweightDispatcher.retargetMouseEvent(Component, int, MouseEvent) line: 4904	
	LightweightDispatcher.processMouseEvent(MouseEvent) line: 4532	
	LightweightDispatcher.dispatchEvent(AWTEvent) line: 4476	
	MainFrame(Container).dispatchEventImpl(AWTEvent) line: 2283	
	MainFrame(Window).dispatchEventImpl(AWTEvent) line: 2746	
	MainFrame(Component).dispatchEvent(AWTEvent) line: 4711	
	EventQueue.dispatchEventImpl(AWTEvent, Object) line: 760	
	EventQueue.access$500(EventQueue, AWTEvent, Object) line: 97	
	EventQueue$3.run() line: 709	
	EventQueue$3.run() line: 703	
	AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]	
	ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 74	
	ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext) line: 84	
	EventQueue$4.run() line: 733	
	EventQueue$4.run() line: 731	
	AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]	
	ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 74	
	EventQueue.dispatchEvent(AWTEvent) line: 730	
	EventDispatchThread.pumpOneEventForFilters(int) line: 205	
	EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 116	
	EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: 105	
	EventDispatchThread.pumpEvents(int, Conditional) line: 101	
	EventDispatchThread.pumpEvents(Conditional) line: 93	
	EventDispatchThread.run() line: 82	

comment:5 by Don-vip, 5 years ago

Owner: changed from Geimas5 to team
Status: needinfonew

comment:6 by GerdP, 5 years ago

Some findings:

  • This problem occurs with almost all buttons, not just the Delete action in the properties dialog. One exception is the validate action button.
  • it is not related to multipolygons, I see it whenever I click on an element while the ALT key is pressed. When I select objects with CTRL key pressed this doesn't happen.
  • the tracebacks are probably not showing the problem cause

comment:7 by GerdP, 5 years ago

More:

  • when I keep the ALT button pressed the buttons work as expected
  • when I release the ALT button after clicking on an element the focus is on the "File" menu (File is active)

So, problem is that the focus is on the wrong element.

comment:8 by GerdP, 5 years ago

The reaction on the ALT key is probably standard MS-Windows behaviour. I see the same in Eclipse (File activated after releasing ALT) but in Eclipse all buttons work as expected after releasing the ALT key.

comment:9 by GerdP, 5 years ago

Cc: simon04 Don-vip added
Keywords: Windows ALT added; relation removed

I have no idea where to continue. The behavior is normal in Windows 10, probably also in older versions, and is needed to make certain key board shortcuts work.
I hope the dialog experts know more?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to Geimas5.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.