Modify

Opened 4 years ago

Closed 4 years ago

#19830 closed defect (fixed)

Bottom toolbar way length indicator doesn't update after align action

Reported by: Famlam Owned by: GerdP
Priority: normal Milestone: 20.09
Component: Core Version: latest
Keywords: template_report length align Cc:

Description (last modified by Famlam)

What steps will reproduce the problem?

  1. Create a random shaped closed way
  2. Check the way length (in the bottom toolbar). [top image]
  3. Align the way as a circle. Way length doesn't change [middle image]
  4. Deselect and select (again) the same way
  5. Way length is now updated [bottom image]

What is the expected result?

Way length updates directly after align action

What happens instead?

Way length only updates after selecting again

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

https://josm.openstreetmap.de/raw-attachment/ticket/19830/toolbar-length-update.png

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-09-06 16:54:59 +0200 (Sun, 06 Sep 2020)
Build-Date:2020-09-07 01:30:48
Revision:17013
Relative:URL: ^/trunk

Identification: JOSM/1.5 (17013 nl) Windows 10 64-Bit
OS Build number: Windows 10 Home 2004 (19041)
Memory Usage: 831 MB / 1820 MB (509 MB allocated, but free)
Java version: 1.8.0_261-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920x1080 (scaling 1.0x1.0)
Maximum Screen Size: 1920x1080
Best cursor sizes: 16x16 -> 32x32, 32x32 -> 32x32
Dataset consistency test: No problems found

Plugins:
+ OpeningHoursEditor (35414)
+ imagery_offset_db (35405)
+ pt_assistant (2.1.10-80-g7d9bba3)
+ reverter (35499)
+ tageditor (35258)
+ turnlanes-tagging (283)
+ undelete (35521)
+ utilsplugin2 (35487)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1
+ %UserProfile%\Documents\tijdelijke bestanden\josm-eigen.mappaint.mapcss

Validator rules:
+ %UserProfile%\Documents\tijdelijke bestanden\josm-eigen.validator.mapcss

Attachments (1)

toolbar-length-update.png (44.8 KB ) - added by Famlam 4 years ago.
Image with an example way

Download all attachments as: .zip

Change History (15)

by Famlam, 4 years ago

Attachment: toolbar-length-update.png added

Image with an example way

comment:1 by Famlam, 4 years ago

Description: modified (diff)

comment:2 by GerdP, 4 years ago

Owner: changed from team to GerdP
Status: newassigned

I see similar problems with other actions, e.g. undoing changes might not refresh the status line.

comment:3 by GerdP, 4 years ago

Resolution: fixed
Status: assignedclosed

In 17056/josm:

fix #19830: Bottom toolbar way length indicator doesn't update after align action

  • Remove checks regarding the number of selected elemments
  • Also react on DataChangedEvent

comment:4 by Klumbumbus, 4 years ago

That also fixed the case when you end drawing a way and it displayed the length of the last segment instead of the whole way. Great!

comment:5 by GerdP, 4 years ago

Milestone: 20.09

comment:6 by Klumbumbus, 4 years ago

Resolution: fixed
Status: closedreopened

When deleting a data layer from the layer list I get a NPE:

Build-Date:2020-09-24 18:44:22
Revision:17057
Is-Local-Build:true

Identification: JOSM/1.5 (17057 SVN en) Windows 10 64-Bit
OS Build number: Windows 10 Pro 1909 (18363)
Memory Usage: 874 MB / 1804 MB (365 MB allocated, but free)
Java version: 1.8.0_261-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.formdev.flatlaf.FlatDarkLaf
Screen: \Display0 1680x1050 (scaling 1.0x1.0)
Maximum Screen Size: 1680x1050
Best cursor sizes: 16x16 -> 32x32, 32x32 -> 32x32

Plugins:
+ HouseNumberTaggingTool (35508)
+ OpeningHoursEditor (35414)
+ PicLayer (35405)
+ RoadSigns (35510)
+ SimplifyArea (35405)
+ apache-commons (35524)
+ buildings_tools (35500)
+ editgpx (35248)
+ flatlaf (35541)
+ imagery-xml-bounds (35546)
+ imagery_offset_db (35405)
+ javafx-windows (35458)
+ jaxb (35092)
+ jna (35092)
+ jogl (1.2.3)
+ measurement (35405)
+ photo_geotagging (35499)
+ photoadjust (35405)
+ reltoolbox (35529)
+ reverter (35554)
+ tageditor (35258)
+ tagging-preset-tester (35267)
+ terracer (35499)
+ turnlanes-tagging (283)
+ turnrestrictions (35515)
+ undelete (35521)
+ utilsplugin2 (35487)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/COVID-19&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Healthcare&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Historical_Objects&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/OneClick&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/NewTags&zip=1
+ %UserProfile%\Documents\OSM\TestNew\newpresets.xml
+ %UserProfile%\Documents\OSM\josm\core\resources\data\defaultpresets.xml
+ https://josm.openstreetmap.de/josmfile?page=Presets/contact(socialnetworks_IMs)&zip=1

Map paint styles:
+ %UserProfile%\Documents\OSM\josm\core\resources\styles\standard\elemstyles.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/HiDPISupport&zip=1
- %UserProfile%\Documents\OSM\josm\core\resources\styles\standard\potlatch2.mapcss
+ %UserProfile%\Documents\OSM\TestNew\newicons.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Modified&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/sac_scale&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/ShowID&zip=1
- %UserProfile%\Documents\OSM\eigene styles\PriorityRoad\PriorityRoad_1.0.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/LayerChecker&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Surface&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Sidewalks&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Cycleways&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/LitObjects&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lit&style&zip=1
- %UserProfile%\Documents\OSM\eigene styles\SpecificBuildingValues\SpecificBuildingValues.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Incline&zip=1
- %UserProfile%\Documents\OSM\eigene styles\area-symbol.zip
- https://josm.openstreetmap.de/josmfile?page=Styles/hazmat&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Suburb&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Postcode&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/RecyclingMaterials&zip=1
- %UserProfile%\Documents\OSM\eigene styles\maxspeed\maxspeed_2.9_01 basierend auf 2.7_02 Zahlen.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Bench&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/ColourTag&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Admin_Boundaries&zip=1
- %UserProfile%\Documents\OSM\eigene styles\yes-no-unset\YesNoUnset_1.0.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1

Validator rules:
+ https://raw.githubusercontent.com/<user.name>n-a-bauer/josm-validators/master/mtb.validator.mapcss
+ %UserProfile%\Documents\OSM\TestNew\new.validator.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Rules/GermanySpecific&zip=1
+ %UserProfile%\Documents\OSM\josm\core\resources\data\validator\numeric.mapcss
+ %UserProfile%\Documents\OSM\josm\core\resources\data\validator\deprecated.mapcss
+ %UserProfile%\Documents\OSM\josm\core\resources\data\validator\combinations.mapcss

Last errors/warnings:
- 00118.905 E: 	at org.openstreetmap.josm.plugins.imagery_offset_db.ImageryOffsetWatcher.checkOffset(ImageryOffsetWatcher.java:124)
- 00118.905 E: 	at org.openstreetmap.josm.plugins.imagery_offset_db.ImageryOffsetWatcher.access$300(ImageryOffsetWatcher.java:38)
- 00118.905 E: 	at org.openstreetmap.josm.plugins.imagery_offset_db.ImageryOffsetWatcher$IntervalOffsetChecker.run(ImageryOffsetWatcher.java:288)
- 00118.905 E: 	at java.util.TimerThread.mainLoop(Unknown Source)
- 00118.906 E: 	at java.util.TimerThread.run(Unknown Source)
- 00332.475 E: Handled by bug report queue: java.lang.NullPointerException
- 00332.481 E: Handled by bug report queue: java.lang.NullPointerException
- 00407.166 E: Handled by bug report queue: java.lang.NullPointerException
- 00407.169 E: Handled by bug report queue: java.lang.NullPointerException
- 00423.220 E: Handled by bug report queue: java.lang.NullPointerException


=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (17) of main
java.lang.NullPointerException
	at org.openstreetmap.josm.gui.MapStatus.dataChanged(MapStatus.java:1267)
	at org.openstreetmap.josm.data.osm.event.DataChangedEvent.fire(DataChangedEvent.java:38)
	at org.openstreetmap.josm.data.osm.event.DatasetEventManager.fireEvents(DatasetEventManager.java:201)
	at org.openstreetmap.josm.data.osm.event.DatasetEventManager.access$200(DatasetEventManager.java:30)
	at org.openstreetmap.josm.data.osm.event.DatasetEventManager$EdtRunnable.run(DatasetEventManager.java:43)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

comment:7 by GerdP, 4 years ago

I'll have a look tomorrow. Can you explain why your MapStatus.java has more lines than the one in svn?

comment:8 by Klumbumbus, 4 years ago

Opps, I have pathes from #19819 applied and didn't remember it touched the MapStatus.java too. I'll try again without these patches.

comment:9 by GerdP, 4 years ago

Resolution: fixed
Status: reopenedclosed

In 17058/josm:

fix #19830: Bottom toolbar way length indicator doesn't update after align action
Add null check

in reply to:  8 comment:10 by GerdP, 4 years ago

Replying to Klumbumbus:

Opps, I have pathes from #19819 applied and didn't remember it touched the MapStatus.java too. I'll try again without these patches.

Don't worry, I was able to reproduce it with the trunk version.

comment:11 by Klumbumbus, 4 years ago

Yes, works fine again (without removing the dark mode patches).

comment:12 by cmuelle8, 4 years ago

Resolution: fixed
Status: closedreopened

Regression with r17084 (current tested):

If a parallel way is created, the length indicator showed the offset in meters as long as the mouse button is not released.

In r17084, possibly since r17058 (?), that offset is in a race condition with the length indication of the line dragged.

By default the parallel way feature snaps to increments of 0.5 meters. As soon as the offset changes in response to an increment event, the length indicator updates with the offset in meters. ms afer that it updates again with the length of the osm way dragged, rendering the offset information useless.

Proposed solution:

As long as the parallel way is dragged, suspend the update of the way length indicator.

I've not checked possible breakage of other use cases employing the way lenght indicator.

Version 0, edited 4 years ago by cmuelle8 (next)

comment:13 by GerdP, 4 years ago

see #19887

comment:14 by GerdP, 4 years ago

Resolution: fixed
Status: reopenedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain GerdP.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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