Changeset 3310 in josm


Ignore:
Timestamp:
Jun 4, 2010 10:36:15 PM (3 years ago)
Author:
bastiK
Message:

fixed #4879 - tooltip: What does "guess" in correlate photos?, #5106 - Broken autocompletion (with numbers?)

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java

    r3288 r3310  
    513513 
    514514        JButton buttonAutoGuess = new JButton(tr("Auto-Guess")); 
     515        buttonAutoGuess.setToolTipText(tr("Matches first photo with first gpx point")); 
    515516        buttonAutoGuess.addActionListener(new AutoGuessActionListener()); 
    516517 
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r3263 r3310  
    238238                Main.map.mapView.addPropertyChangeListener(layer); 
    239239                if (Main.map.getToggleDialog(ImageViewerDialog.class) == null) { 
    240                     System.err.println("JO"); 
    241                     ImageViewerDialog.newInstance();// = new ImageViewerDialog(); 
     240                    ImageViewerDialog.newInstance(); 
    242241                    Main.map.addToggleDialog(ImageViewerDialog.getInstance()); 
    243242                } 
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java

    r3215 r3310  
    2020import javax.swing.text.StyleConstants; 
    2121 
     22import org.openstreetmap.josm.Main; 
     23 
    2224/** 
    2325 * @author guilhem.bonnefille@gmail.com 
     
    6971             
    7072            // if the text starts with a number we don't autocomplete 
    71             // 
    72             try { 
    73                 Long.parseLong(str); 
    74                 if (curText.length() == 0) { 
    75                     // we don't autocomplete on numbers 
     73            if (Main.pref.getBoolean("autocomplete.dont_complete_numbers", false)) { 
     74                try { 
     75                    Long.parseLong(str); 
     76                    if (curText.length() == 0) { 
     77                        // we don't autocomplete on numbers 
     78                        return; 
     79                    } 
     80                    Long.parseLong(curText); 
    7681                    return; 
    77                 } 
    78                 Long.parseLong(curText); 
    79                 return; 
    80             } catch (NumberFormatException e) { 
    81                 // either the new text or the current text isn't a number. We continue with 
    82                 // autocompletion 
     82                } catch (NumberFormatException e) { 
     83                    // either the new text or the current text isn't a number. We continue with 
     84                    // autocompletion 
     85                } 
    8386            } 
    8487             
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java

    r3215 r3310  
    2121import javax.swing.text.StyleConstants; 
    2222 
     23import org.openstreetmap.josm.Main; 
    2324import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionList; 
    2425import org.openstreetmap.josm.gui.util.TableCellEditorSupport; 
     
    7172            String currentText = getText(0, getLength()); 
    7273            // if the text starts with a number we don't autocomplete 
    73             // 
    74             try { 
    75                 Long.parseLong(str); 
    76                 if (currentText.length() == 0) { 
    77                     // we don't autocomplete on numbers 
     74            if (Main.pref.getBoolean("autocomplete.dont_complete_numbers", false)) { 
     75                try { 
     76                    Long.parseLong(str); 
     77                    if (currentText.length() == 0) { 
     78                        // we don't autocomplete on numbers 
     79                        super.insertString(offs, str, a); 
     80                        return; 
     81                    } 
     82                    Long.parseLong(currentText); 
    7883                    super.insertString(offs, str, a); 
    7984                    return; 
     85                } catch(NumberFormatException e) { 
     86                    // either the new text or the current text isn't a number. We continue with 
     87                    // autocompletion 
    8088                } 
    81                 Long.parseLong(currentText); 
    82                 super.insertString(offs, str, a); 
    83                 return; 
    84             } catch(NumberFormatException e) { 
    85                 // either the new text or the current text isn't a number. We continue with 
    86                 // autocompletion 
    8789            } 
    8890            String prefix = currentText.substring(0, offs); 
Note: See TracChangeset for help on using the changeset viewer.