- Timestamp:
- 2016-01-01T20:25:44+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
r9230 r9245 19 19 import java.util.List; 20 20 import java.util.Set; 21 import java.util.concurrent.atomic.AtomicInteger; 21 22 22 23 import javax.swing.DefaultListCellRenderer; … … 132 133 public void actionPerformed(ActionEvent e) { 133 134 135 if (SegmentToKeepSelectionDialog.DISPLAY_COUNT.get() > 0) { 136 new Notification(tr("Cannot split since another split operation is already in progress")) 137 .setIcon(JOptionPane.WARNING_MESSAGE).show(); 138 return; 139 } 140 134 141 Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected(); 135 142 … … 216 223 */ 217 224 static class SegmentToKeepSelectionDialog extends ExtendedDialog { 225 static final AtomicInteger DISPLAY_COUNT = new AtomicInteger(); 218 226 final Way selectedWay; 219 227 final List<Way> newWays; … … 238 246 pane.add(list, GBC.eop().fill(GBC.HORIZONTAL)); 239 247 setContent(pane); 248 setDefaultCloseOperation(HIDE_ON_CLOSE); 240 249 } 241 250 … … 283 292 super.setVisible(visible); 284 293 if (visible) { 294 DISPLAY_COUNT.incrementAndGet(); 285 295 list.setSelectedValue(wayToKeep, true); 286 296 } else { 287 297 setHighlightedWaySegments(Collections.<WaySegment>emptyList()); 298 DISPLAY_COUNT.decrementAndGet(); 288 299 } 289 300 }
Note:
See TracChangeset
for help on using the changeset viewer.