Changeset 5786 in josm for trunk


Ignore:
Timestamp:
2013-03-19T12:58:22+01:00 (7 years ago)
Author:
akks
Message:

Download primitive dialog: window width limit,
buffer size limit for autopasting from clipboard (downloadprimitive.max-autopaste-length)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadObjectDialog.java

    r5765 r5786  
    66
    77import java.awt.Component;
     8import java.awt.Dimension;
    89import java.awt.event.ItemEvent;
    910import java.awt.event.ItemListener;
     
    9091        // forward the enter key stroke to the download button
    9192        tfId.getKeymap().removeKeyStrokeBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false));
     93        tfId.setPreferredSize(new Dimension(400, tfId.getPreferredSize().height));
    9294       
    9395        newLayer.setToolTipText(tr("Select if the data should be downloaded into a new layer"));
     
    203205                txt=buf;
    204206            }
    205             tfId.tryToPasteFrom(txt);
     207            if (buf.length() <= Main.pref.getInteger("downloadprimitive.max-autopaste-length", 2000)) {
     208                tfId.tryToPasteFrom(txt);
     209            }
    206210        }
    207211    }
Note: See TracChangeset for help on using the changeset viewer.