Changeset 2218 in josm


Ignore:
Timestamp:
Sep 30, 2009 10:51:31 AM (4 years ago)
Author:
Gubaer
Message:

see #3371: Fatal freeze trying to enter a changeset comment

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
3 added
1 deleted
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java

    r2193 r2218  
    2626import java.util.HashMap; 
    2727import java.util.HashSet; 
    28 import java.util.LinkedList; 
    2928import java.util.List; 
    3029import java.util.Map; 
     
    7675import org.openstreetmap.josm.gui.preferences.TaggingPresetPreference; 
    7776import org.openstreetmap.josm.gui.tagging.TaggingPreset; 
    78 import org.openstreetmap.josm.tools.AutoCompleteComboBox; 
     77import org.openstreetmap.josm.gui.widgets.AutoCompleteComboBox; 
    7978import org.openstreetmap.josm.tools.GBC; 
    8079import org.openstreetmap.josm.tools.ImageProvider; 
     
    529528        boolean top = Main.pref.getBoolean("properties.presets.top", true); 
    530529        bothTables.setLayout(new GridBagLayout()); 
    531         if(top) 
     530        if(top) { 
    532531            bothTables.add(presets, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 2, 5, 2)); 
     532        } 
    533533        bothTables.add(selectSth, GBC.eol().fill().insets(10, 10, 10, 10)); 
    534534        bothTables.add(propertyTable.getTableHeader(), GBC.eol().fill(GBC.HORIZONTAL)); 
     
    536536        bothTables.add(membershipTable.getTableHeader(), GBC.eol().fill(GBC.HORIZONTAL)); 
    537537        bothTables.add(membershipTable, GBC.eol().fill(GBC.BOTH)); 
    538         if(!top) 
     538        if(!top) { 
    539539            bothTables.add(presets, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 2, 5, 2)); 
     540        } 
    540541 
    541542        DblClickWatch dblClickWatch = new DblClickWatch(); 
  • trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java

    r2191 r2218  
    5252import org.openstreetmap.josm.gui.OsmPrimitivRenderer; 
    5353import org.openstreetmap.josm.gui.SideButton; 
    54 import org.openstreetmap.josm.gui.historycombobox.SuggestingJHistoryComboBox; 
    5554import org.openstreetmap.josm.gui.tagging.TagEditorModel; 
    5655import org.openstreetmap.josm.gui.tagging.TagEditorPanel; 
    5756import org.openstreetmap.josm.gui.tagging.TagModel; 
     57import org.openstreetmap.josm.gui.widgets.HistoryComboBox; 
    5858import org.openstreetmap.josm.io.OsmApi; 
    5959import org.openstreetmap.josm.tools.GBC; 
     
    588588        private JCheckBox cbCloseAfterUpload; 
    589589        private OpenChangesetModel model; 
    590         private SuggestingJHistoryComboBox cmt; 
     590        private HistoryComboBox cmt; 
    591591        private JCheckBox cbUseAtomicUpload; 
    592592 
     
    616616            pnl.setLayout(new GridBagLayout()); 
    617617            pnl.add(new JLabel(tr("Provide a brief comment for the changes you are uploading:")), GBC.eol().insets(0, 5, 10, 3)); 
    618             cmt = new SuggestingJHistoryComboBox(); 
     618            cmt = new HistoryComboBox(); 
    619619            List<String> cmtHistory = new LinkedList<String>(Main.pref.getCollection(HISTORY_KEY, new LinkedList<String>())); 
    620             cmt.setHistory(cmtHistory); 
     620            cmt.setPossibleItems(cmtHistory); 
    621621            cmt.getEditor().addActionListener( 
    622622                    new ActionListener() { 
  • trunk/src/org/openstreetmap/josm/gui/widgets/AutoCompleteComboBox.java

    r2212 r2218  
    11// License: GPL. Copyright 2007 by Immanuel Scholz and others 
    2 package org.openstreetmap.josm.tools; 
     2package org.openstreetmap.josm.gui.widgets; 
    33 
    44import java.util.Collection; 
     
    5555            Object item = lookupItem(curText); 
    5656            setSelectedItem(item); 
    57             if(initial) 
     57            if(initial) { 
    5858                start = 0; 
     59            } 
    5960            if (item != null) { 
    6061                String newText = item.toString(); 
     
    100101        Object oldValue = this.getEditor().getItem(); 
    101102        model.removeAllElements(); 
    102         for (String elem : elems) model.addElement(elem); 
     103        for (String elem : elems) { 
     104            model.addElement(elem); 
     105        } 
    103106        this.getEditor().setItem(oldValue); 
    104107    } 
Note: See TracChangeset for help on using the changeset viewer.