Changeset 32058 in osm for applications/editors/josm
- Timestamp:
- 2016-02-09T16:58:35+01:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/wikipedia/src/org/wikipedia
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wikipedia/src/org/wikipedia/FetchWikidataAction.java
r31853 r32058 21 21 import org.openstreetmap.josm.command.SequenceCommand; 22 22 import org.openstreetmap.josm.data.osm.OsmPrimitive; 23 import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil; 23 24 import org.openstreetmap.josm.gui.Notification; 24 25 import org.openstreetmap.josm.gui.PleaseWaitRunnable; … … 124 125 "Fetching {0} Wikidata IDs for language ''{1}''", size, size, lang)); 125 126 final Map<String, String> wikidataByWikipedia = WikipediaApp.getWikidataForArticles(lang, byArticle.keySet()); 127 ConditionalOptionPaneUtil.startBulkOperation(GuiUtils.PREF_OVERWRITE); 126 128 for (Map.Entry<String, Set<OsmPrimitive>> i : byArticle.entrySet()) { 127 129 final String wikipedia = i.getKey(); 128 130 final String wikidata = wikidataByWikipedia.get(wikipedia); 129 131 if (wikidata != null) { 130 commands.add(new ChangePropertyCommand(i.getValue(), "wikidata", wikidata)); 132 if (GuiUtils.confirmOverwrite("wikidata", wikidata, i.getValue())) { 133 commands.add(new ChangePropertyCommand(i.getValue(), "wikidata", wikidata)); 134 } 131 135 } else { 132 136 final WikipediaApp.WikipediaLangArticle article = new WikipediaApp.WikipediaLangArticle(lang, wikipedia); … … 135 139 } 136 140 } 141 ConditionalOptionPaneUtil.endBulkOperation(GuiUtils.PREF_OVERWRITE); 137 142 monitor.finishTask(); 138 143 } -
applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaToggleDialog.java
r31917 r32058 269 269 if (tag != null) { 270 270 final Collection<OsmPrimitive> selected = Main.main.getCurrentDataSet().getSelected(); 271 if (!GuiUtils.confirmOverwrite(tag.getKey(), tag.getValue(), selected)) { 272 return; 273 } 271 274 ChangePropertyCommand cmd = new ChangePropertyCommand( 272 275 selected,
Note:
See TracChangeset
for help on using the changeset viewer.