[josm-dev] Node rendring fix
Petr Nejedly
Petr.Nejedly at Sun.COM
Tue Aug 19 22:06:00 BST 2008
For a long time, I have suffered from a random problem that nodes
on some ways were not visible (were under) with mappaint and close zooms.
This makes slight updates to nearly stright ways very frustrating.
I have finally uncovered the cause of the problem and fixed it. Please apply
the following trivial patch:
Index: src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
===================================================================
--- src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java (revision 808)
+++ src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java (working copy)
@@ -330,10 +330,11 @@
osm.visit(this);
}
+ displaySegments();
+
for (final OsmPrimitive osm : data.nodes)
if (!osm.incomplete && !osm.deleted)
osm.visit(this);
- displaySegments();
}
/**
----------------
The problem was the delayed painting of the last few ways,
quite certainly the ways you're currently working on.
This patch forces the flush of the accumulated path.
I took the liberty and moved, not copied, the displaySegments() call,
as I know nodes don't use this facility, but should you consider it unsafe,
just ignore the second part of the change.
--
Petr "Nenik" Nejedly, NetBeans/Sun Microsystems, http://www.netbeans.org
355/113 -- Not the famous irrational number PI, but an incredible simulation!
More information about the josm-dev
mailing list