Changeset 202 in josm for src/org/openstreetmap/josm/gui


Ignore:
Timestamp:
2007-02-15T17:32:41+01:00 (18 years ago)
Author:
imi
Message:
  • fixed Bug with AnnotationPresets not loading values-tag properly
Location:
src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/gui/annotation/AnnotationPreset.java

    r193 r202  
    9595                public String text;
    9696                public String values;
    97                 public String display_values = "";
     97                public String display_values;
    9898                public String default_;
    9999                public boolean delete_if_empty = false;
     
    103103
    104104                public void addToPanel(JPanel p) {
    105                         combo = new JComboBox(display_values.split(","));
     105                        combo = new JComboBox((display_values != null ? display_values : values).split(","));
    106106                        combo.setEditable(editable);
    107107                        combo.setSelectedItem(default_);
  • src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java

    r201 r202  
    181181                instance.addMouseListener(new MouseAdapter(){
    182182                        private void openPopup(MouseEvent e) {
     183                                Point p = listScrollPane.getMousePosition();
     184                                if (p == null)
     185                                        return; // user is faster than swing with mouse movement
    183186                                int index = instance.locationToIndex(e.getPoint());
    184187                                Layer layer = (Layer)instance.getModel().getElementAt(index);
    185188                                LayerListPopup menu = new LayerListPopup(instance, layer);
    186                                 Point p = listScrollPane.getMousePosition();
    187189                                menu.show(listScrollPane, p.x, p.y-3);
    188190                        }
Note: See TracChangeset for help on using the changeset viewer.