Changeset 6130 in josm for trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
- Timestamp:
- 2013-08-10T12:06:25+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
r6093 r6130 42 42 import org.openstreetmap.josm.data.osm.TagCollection; 43 43 import org.openstreetmap.josm.data.osm.Way; 44 import org.openstreetmap.josm.gui.Notification; 44 45 import org.openstreetmap.josm.gui.conflict.tags.CombinePrimitiveResolverDialog; 45 46 import org.openstreetmap.josm.tools.Geometry; … … 320 321 321 322 if (ways.isEmpty()) { 322 JOptionPane.showMessageDialog(Main.parent, tr("Please select at least one closed way that should be joined.")); 323 new Notification( 324 tr("Please select at least one closed way that should be joined.")) 325 .setIcon(JOptionPane.INFORMATION_MESSAGE) 326 .show(); 323 327 return; 324 328 } … … 327 331 for (Way way : ways) { 328 332 if (!way.isClosed()) { 329 JOptionPane.showMessageDialog(Main.parent, tr("One of the selected ways is not closed and therefore cannot be joined.")); 333 new Notification( 334 tr("One of the selected ways is not closed and therefore cannot be joined.")) 335 .setIcon(JOptionPane.INFORMATION_MESSAGE) 336 .show(); 330 337 return; 331 338 } … … 355 362 356 363 if (!testJoin(areas)) { 357 JOptionPane.showMessageDialog(Main.parent, tr("No intersection found. Nothing was changed.")); 364 new Notification( 365 tr("No intersection found. Nothing was changed.")) 366 .setIcon(JOptionPane.INFORMATION_MESSAGE) 367 .show(); 358 368 return; 359 369 } … … 377 387 Main.map.mapView.repaint(); 378 388 } else { 379 JOptionPane.showMessageDialog(Main.parent, tr("No intersection found. Nothing was changed.")); 389 new Notification( 390 tr("No intersection found. Nothing was changed.")) 391 .setIcon(JOptionPane.INFORMATION_MESSAGE) 392 .show(); 380 393 } 381 394 } … … 518 531 519 532 if (warnAboutRelations) { 520 JOptionPane.showMessageDialog(Main.parent, tr("Some of the ways were part of relations that have been modified. Please verify no errors have been introduced.")); 533 new Notification( 534 tr("Some of the ways were part of relations that have been modified.<br>Please verify no errors have been introduced.")) 535 .setIcon(JOptionPane.INFORMATION_MESSAGE) 536 .setDuration(Notification.TIME_LONG) 537 .show(); 521 538 } 522 539 … … 1212 1229 1213 1230 if (outerWays.size() > 1) { 1214 JOptionPane.showMessageDialog(Main.parent, tr("Sorry. Cannot handle multipolygon relations with multiple outer ways.")); 1231 new Notification( 1232 tr("Sorry. Cannot handle multipolygon relations with multiple outer ways.")) 1233 .setIcon(JOptionPane.INFORMATION_MESSAGE) 1234 .show(); 1215 1235 return null; 1216 1236 } … … 1222 1242 1223 1243 if (processedOuterWays.contains(outerWay)) { 1224 JOptionPane.showMessageDialog(Main.parent, tr("Sorry. Cannot handle way that is outer in multiple multipolygon relations.")); 1244 new Notification( 1245 tr("Sorry. Cannot handle way that is outer in multiple multipolygon relations.")) 1246 .setIcon(JOptionPane.INFORMATION_MESSAGE) 1247 .show(); 1225 1248 return null; 1226 1249 } 1227 1250 1228 1251 if (processedInnerWays.contains(outerWay)) { 1229 JOptionPane.showMessageDialog(Main.parent, tr("Sorry. Cannot handle way that is both inner and outer in multipolygon relations.")); 1252 new Notification( 1253 tr("Sorry. Cannot handle way that is both inner and outer in multipolygon relations.")) 1254 .setIcon(JOptionPane.INFORMATION_MESSAGE) 1255 .show(); 1230 1256 return null; 1231 1257 } … … 1234 1260 { 1235 1261 if (processedOuterWays.contains(way)) { 1236 JOptionPane.showMessageDialog(Main.parent, tr("Sorry. Cannot handle way that is both inner and outer in multipolygon relations.")); 1262 new Notification( 1263 tr("Sorry. Cannot handle way that is both inner and outer in multipolygon relations.")) 1264 .setIcon(JOptionPane.INFORMATION_MESSAGE) 1265 .show(); 1237 1266 return null; 1238 1267 } 1239 1268 1240 1269 if (processedInnerWays.contains(way)) { 1241 JOptionPane.showMessageDialog(Main.parent, tr("Sorry. Cannot handle way that is inner in multiple multipolygon relations.")); 1270 new Notification( 1271 tr("Sorry. Cannot handle way that is inner in multiple multipolygon relations.")) 1272 .setIcon(JOptionPane.INFORMATION_MESSAGE) 1273 .show(); 1242 1274 return null; 1243 1275 }
Note:
See TracChangeset
for help on using the changeset viewer.
