Changeset 1696 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2009-06-27T01:06:24+02:00 (15 years ago)
Author:
stoecker
Message:

fixed mappaint area style handling for closed ways a little bit again

Location:
trunk/src/org/openstreetmap/josm
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java

    r1695 r1696  
    833833            for (Way w : outer)
    834834            {
    835                if(wayStyle == null || !(wayStyle instanceof AreaElemStyle))
    836                    wayStyle = styles.get(w);
     835               if(wayStyle == null)
     836                   wayStyle = styles.getArea(w);
    837837            }
    838838            r.mappaintStyle = wayStyle;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java

    r1690 r1696  
    366366            if (way1 != null) {
    367367                int next = i+1;
    368                 while (next < clone.members.size()) {
    369                     m = clone.members.get(next++);
     368                while (next <= clone.members.size()) {
     369                    m = clone.members.get(next == clone.members.size() ? 0 : next);
     370                    next++;
    370371                    depth = 0;
    371372                    while (m != null && depth < 10) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java

    r1695 r1696  
    126126        }
    127127
     128        public ElemStyle getArea(Way osm)
     129        {
     130            if(osm.keys != null)
     131            {
     132                /* force area mode also for unclosed ways */
     133                ElemStyle style = get(osm.keys, false);
     134                if(style != null && style instanceof AreaElemStyle)
     135                    return style;
     136            }
     137            return null;
     138        }
     139
    128140        public IconElemStyle getIcon(OsmPrimitive osm)
    129141        {
  • trunk/src/org/openstreetmap/josm/io/GpxImporter.java

    r1637 r1696  
    66import java.io.File;
    77import java.io.FileInputStream;
     8import java.io.FileNotFoundException;
    89import java.io.IOException;
    910import java.io.InputStream;
     
    5051                    Main.main.addLayer(ml);
    5152            }
     53        } catch (FileNotFoundException e) {
     54            e.printStackTrace();
     55            throw new IOException(tr("File \"{0}\" does not exist", file.getName()));
    5256        } catch (SAXException e) {
    5357            e.printStackTrace();
    54             throw new IOException(tr("Could not read \"{0}\"", file.getName()));
     58            throw new IOException(tr("Parsing file \"{0}\" failed", file.getName()));
    5559        }
    56 
    5760    }
    58 
    5961}
  • trunk/src/org/openstreetmap/josm/io/OsmImporter.java

    r1653 r1696  
    3838        } catch (FileNotFoundException e) {
    3939            e.printStackTrace();
    40             throw new IOException(tr("Could not read \"{0}\"", file.getName()));
     40            throw new IOException(tr("File \"{0}\" does not exist", file.getName()));
    4141        } catch (SAXException e) {
    4242            e.printStackTrace();
    43             throw new IOException(tr("Could not read \"{0}\"", file.getName()));
     43            throw new IOException(tr("Parsing file \"{0}\" failed", file.getName()));
    4444        }
    4545    }
Note: See TracChangeset for help on using the changeset viewer.