Changeset 10694 in josm for trunk


Ignore:
Timestamp:
2016-08-01T20:40:03+02:00 (8 years ago)
Author:
simon04
Message:

fix #13249 see #13236 - No not change caret position (for editable text areas)

Reverts r10665.

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

Legend:

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

    r10619 r10694  
    100100        jte.setEditable(false);
    101101        jte.append(s);
     102        jte.setCaretPosition(0);
    102103        p.add(new JScrollPane(jte), GBC.std().fill());
    103104        return p;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java

    r10627 r10694  
    659659                txtSource.append("<ERROR: failed to read file!>");
    660660            }
     661            txtSource.setCaretPosition(0);
    661662        }
    662663
     
    669670                txtErrors.append(t.toString() + '\n');
    670671            }
     672            txtErrors.setCaretPosition(0);
    671673        }
    672674    }
  • trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextArea.java

    r10665 r10694  
    66
    77import javax.swing.JTextArea;
    8 import javax.swing.text.Caret;
    9 import javax.swing.text.DefaultCaret;
    108import javax.swing.text.Document;
    119
     
    9088        TextContextualPopupMenu.enableMenuFor(this, true);
    9189        addFocusListener(this);
    92         Caret c = getCaret();
    93         if (c instanceof DefaultCaret) {
    94             // Prevent component to scroll down after setting large text, forcing users to initially scroll up
    95             ((DefaultCaret) c).setUpdatePolicy(DefaultCaret.NEVER_UPDATE);
    96         }
    9790    }
    9891
Note: See TracChangeset for help on using the changeset viewer.