[OSM-dev] Re: [RFC] Beautify scale bar

Jan-Benedict Glaw jbglaw at lug-owl.de
Sun May 14 15:10:33 BST 2006


On Sun, 2006-05-14 14:53:55 +0100, SteveC <steve at asklater.com> wrote:
> * @ 14/05/06 02:37:37 PM jbglaw at lug-owl.de wrote:
> > On Sun, 2006-05-14 14:27:06 +0100, SteveC <steve at asklater.com> wrote:
> > > > That sounds like even more bloat:) Here's an updated patch:
> > > 
> > > eek, I just applied your last one :-)
> > 
> > No problem, I've diffed it out once again. Though `svn' is really dumb
> > about merging the conflicts. With proper tracking, that should have
> > been solved without user interaction:-(
> 
> Ok, applied. Also doubled the default segment width... I'm getting

You should have adjusted the comment, too:

Index: src/org/openstreetmap/processing/OsmApplet.java
===================================================================
--- src/org/openstreetmap/processing/OsmApplet.java	(revision 1026)
+++ src/org/openstreetmap/processing/OsmApplet.java	(working copy)
@@ -678,7 +678,7 @@
 	}
 
 	public void recalcStrokeWeight() {
-		// 10m roads, but min 2px width
+		// 20m roads, but min 2px width
 		strokeWeight = max(20.0f / tiles.metersPerPixel(), 2.0f);
 	}
 
> exceptions which make it immpossible to delete segments and I only have
> the one VM here so I havn't deployed any of this until I or someone else
> can verify it on other VMs.
> 
> Click to delete an object
> org.openstreetmap.processing.DeleteMode at b22d99ready:trueClick to delete
> an object
> Click to delete an object
> Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
>         at org.openstreetmap.util.Line.distance(Line.java:101)
>         at org.openstreetmap.util.Line.mouseOver(Line.java:121)
>         at org.openstreetmap.processing.DeleteMode.mouseReleased(DeleteMode.java:40)

Seems DeleteMode.mouseReleased() goes through all applet.lines[] and
at least one of these doesn't have the  `from'  or  `to'  Node set.

I'd put some stack dumping into Line(from, to, id) to catch the bad
setter.  ...or alternatively, just throw an exception if  `from'  and
`to'  aren't both set.

MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw at lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20060514/7ebbdc21/attachment.pgp>


More information about the dev mailing list