Changeset 19459 in josm
- Timestamp:
- 2026-01-10T13:23:58+01:00 (6 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java
r19261 r19459 8 8 import java.awt.GridBagLayout; 9 9 import java.awt.Insets; 10 import java.text.NumberFormat;11 import java.text.ParseException;12 10 import java.util.ArrayList; 13 11 import java.util.Collection; … … 169 167 bg.add(aibutton); 170 168 try { 171 // TODO there must be a better way to parse a number like "+3" than this. 172 final int buttonvalue = NumberFormat.getIntegerInstance().parse(ai.replace("+", "")).intValue(); 169 // NumberFormat cannot parse negative for hr_HR and also needs a workaround for the + 170 // see #2374 171 final int buttonvalue = Integer.parseInt(ai); 173 172 if (auto_increment_selected == buttonvalue) aibutton.setSelected(true); 174 173 aibutton.addActionListener(e -> auto_increment_selected = buttonvalue); 175 174 pnl.add(aibutton, GBC.std()); 176 } catch ( ParseException ex) {175 } catch (NumberFormatException ex) { 177 176 Logging.error("Cannot parse auto-increment value of '" + ai + "' into an integer"); 178 177 }
Note:
See TracChangeset
for help on using the changeset viewer.
