Changeset 1771 in josm for trunk/src


Ignore:
Timestamp:
2009-07-12T10:40:30+02:00 (16 years ago)
Author:
Gubaer
Message:

fixed #2914: Re-edits in relation-editor impossible

File:
1 edited

Legend:

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

    r1762 r1771  
    4040                return;
    4141            }
     42
     43            // if the current offset isn't at the end of the document we don't autocomplete.
     44            // If a highlighted autocompleted suffix was present and we get here Swing has
     45            // already removed it from the document. getLength() therefore doesn't include the
     46            // autocompleted suffix.
     47            //
     48            if (offs < getLength()) {
     49                super.insertString(offs, str, a);
     50                return;
     51            }
    4252            String currentText = getText(0, getLength());
    4353            String prefix = currentText.substring(0, offs);
     
    6272                super.insertString(0,newText,a);
    6373                setCaretPosition(getLength());
     74
    6475            }
    6576        }
Note: See TracChangeset for help on using the changeset viewer.