Changeset 1205 in josm


Ignore:
Timestamp:
2009-01-02T15:09:04+01:00 (16 years ago)
Author:
stoecker
Message:

fix bug #1949 and some other minor issues

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/Main.java

    r1198 r1205  
    232232        String [] oldplugins = new String[] {"mappaint", "unglueplugin",
    233233        "lang-de", "lang-en_GB", "lang-fr", "lang-it", "lang-pl", "lang-ro",
    234         "lang-ru", "ewmsplugin", "ywms"};
     234        "lang-ru", "ewmsplugin", "ywms", "tways-0.2", "geotagged", "landsat"};
    235235        for (String p : oldplugins) {
    236236            if (plugins.contains(p)) {
  • trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java

    r1169 r1205  
    136136        } catch (IOException x) {
    137137            x.printStackTrace();
    138             JOptionPane.showMessageDialog(Main.parent, tr("Error while exporting {0}", fn)+":\n"+x.getMessage(), tr("Error"), JOptionPane.ERROR_MESSAGE);
     138            JOptionPane.showMessageDialog(Main.parent, tr("Error while exporting {0}:\n{1}", fn,x.getMessage()), tr("Error"), JOptionPane.ERROR_MESSAGE);
    139139        }
    140140    }
  • trunk/src/org/openstreetmap/josm/actions/PasteAction.java

    r1169 r1205  
    8888            List<RelationMember> members = new ArrayList<RelationMember>();
    8989            for (RelationMember m : r.members) {
    90                 RelationMember mnew = new RelationMember(m);
    91                 mnew.member = map.get(m.member);
    92                 members.add(mnew);
     90                OsmPrimitive mo = map.get(m.member);
     91                if(mo != null) /* TODO - This only prevents illegal data, but kills the relation */
     92                {
     93                    RelationMember mnew = new RelationMember(m);
     94                    mnew.member = map.get(m.member);
     95                    members.add(mnew);
     96                }
    9397            }
    9498            rnew.members.clear();
  • trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java

    r1169 r1205  
    7676
    7777            final JMultilineLabel label1 = new JMultilineLabel(description);
    78             label1.setMaxWidth(400);
    79             p.add(label1, GBC.eop());
     78            label1.setMaxWidth(600);
     79            p.add(label1, GBC.eop().anchor(GBC.CENTER));
    8080
    8181            final JMultilineLabel label2 = new JMultilineLabel(
    8282                    tr("Please select which property changes you want to apply."));
    83             label2.setMaxWidth(400);
    84             p.add(label2, GBC.eop());
     83            label2.setMaxWidth(600);
     84            p.add(label2, GBC.eop().anchor(GBC.CENTER));
    8585
    8686            for (OsmPrimitive primitive : tagCorrectionsMap.keySet()) {
     
    103103                        tagCorrections);
    104104                final JScrollPane scrollPane = new JScrollPane(table);
    105                 p.add(scrollPane, GBC.eop());
     105                p.add(scrollPane, GBC.eop().fill(GBC.HORIZONTAL));
    106106
    107107                tagTableMap.put(primitive, table);
     
    127127                        roleCorrections);
    128128                final JScrollPane scrollPane = new JScrollPane(table);
    129                 p.add(scrollPane, GBC.eop());
     129                p.add(scrollPane, GBC.eop().fill(GBC.HORIZONTAL));
    130130
    131131                roleTableMap.put(primitive, table);
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java

    r1202 r1205  
    307307        for (RelationMember m : r.members)
    308308        {
    309             if (!m.member.incomplete && !m.member.deleted
     309            if (m.member != null && !m.member.incomplete && !m.member.deleted
    310310            && !(m.member instanceof Relation))
    311311            {
     
    355355                {
    356356                    /* second call - draw nodes */
    357                     if (!m.member.incomplete && !m.member.deleted
     357                    if (m.member != null && !m.member.incomplete && !m.member.deleted
    358358                    && m.member instanceof Node)
    359359                    {
     
    382382        for (RelationMember m : r.members)
    383383        {
    384             if(m.member.incomplete)
    385                 incomplete = true;
     384            if(m.member == null) /* Should not happen, must be a bug elsewhere */
     385                r.putError(tr("Empty member in relation."), true);
    386386            else if(m.member.deleted)
    387387                r.putError(tr("Deleted member ''{0}'' in relation.",
    388388                m.member.getName()), true);
     389            else if(m.member.incomplete)
     390                incomplete = true;
    389391            else
    390392            {
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r1179 r1205  
    130130        // get the preferences.
    131131        final File prefDir = new File(Main.pref.getPreferencesDir());
    132         // check if preferences directory has moved (TODO: Update code. Remove this after some time)
    133         File oldPrefDir = new File(System.getProperty("user.home"), ".josm");
    134         if (!prefDir.isDirectory() && oldPrefDir.isDirectory()) {
    135             if (oldPrefDir.renameTo(prefDir)) {
    136                 // do not translate this
    137                 JOptionPane.showMessageDialog(null, "The preference directory has been moved to "+prefDir);
    138             } else {
    139                 JOptionPane.showMessageDialog(null, "The preference directory location has changed. Please move "+oldPrefDir+" to "+prefDir);
    140             }
    141         }
    142 
    143         if (prefDir.exists() && !prefDir.isDirectory()) {
    144             JOptionPane.showMessageDialog(null, "Cannot open preferences directory: "+Main.pref.getPreferencesDir());
    145             return;
    146         }
    147         if (!prefDir.exists())
     132        if (prefDir.exists()) {
     133            if(!prefDir.isDirectory()) {
     134                JOptionPane.showMessageDialog(null, tr("Cannot open preferences directory: {0}",Main.pref.getPreferencesDir()));
     135                return;
     136            }
     137        }
     138        else
    148139            prefDir.mkdirs();
    149140
     
    161152            e1.printStackTrace();
    162153            String backup = Main.pref.getPreferencesDir() + "preferences.bak";
    163             JOptionPane.showMessageDialog(null, "Preferences file had errors.  Making backup of old one to " + backup);
     154            JOptionPane.showMessageDialog(null, tr("Preferences file had errors. Making backup of old one to {0}.", backup));
    164155            new File(Main.pref.getPreferencesDir() + "preferences").renameTo(new File(backup));
    165156            Main.pref.save();
    166157        }
    167 
    168         // TODO remove this in early 2009 - just here to weed out color setting we don't use any more
    169         Main.pref.put("downloaded Area", null);
    170158
    171159        String localeName = null; //The locale to use
  • trunk/src/org/openstreetmap/josm/gui/dialogs/RelationEditor.java

    r1195 r1205  
    159159     * Compare two OsmPrimitives.
    160160     */
    161     private static int compareMemebers(OsmPrimitive o1, OsmPrimitive o2) {
     161    private static int compareMembers(OsmPrimitive o1, OsmPrimitive o2) {
    162162        return collator.compare(o1.getName(), o2.getName());
    163163    }
     
    168168
    169169            if (roleResult == 0)
    170                 roleResult = compareMemebers(r1.member, r2.member);
     170                roleResult = compareMembers(r1.member, r2.member);
    171171
    172172            return roleResult;
  • trunk/src/org/openstreetmap/josm/io/OsmWriter.java

    r1169 r1205  
    9494            super.header(out);
    9595            for (DataSource s : ds.dataSources) {
    96                 // TODO: remove <bound> output after a grace period (1st October 08)
    97                 out.print("  <bound note='this tag is deprecated and only provided for backward compatiblity' box='"+
    98                         s.bounds.min.lat()+","+
    99                         s.bounds.min.lon()+","+
    100                         s.bounds.max.lat()+","+
    101                         s.bounds.max.lon()+"' ");
    10296                out.println("origin='"+XmlWriter.encode(s.origin)+"' />");
    10397                out.print("  <bounds minlat='" +
Note: See TracChangeset for help on using the changeset viewer.