| 247 | | if (!(mainNodeInfo instanceof TestError)) { |
| 248 | | Set<String> state = new HashSet<>(); |
| 249 | | // ask if the whole set should be ignored |
| 250 | | if (asked == JOptionPane.DEFAULT_OPTION) { |
| 251 | | String[] a = new String[] {tr("Whole group"), tr("Single elements"), tr("Nothing")}; |
| 252 | | asked = JOptionPane.showOptionDialog(MainApplication.getMainFrame(), tr("Ignore whole group or individual elements?"), |
| 253 | | tr("Ignoring elements"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, |
| 254 | | a, a[1]); |
| | 247 | final int depth = node.getDepth(); |
| | 248 | if (depth <= 1) { |
| | 249 | if (!(mainNodeInfo instanceof TestError)) { |
| | 250 | Set<String> state = new HashSet<>(); |
| | 251 | // ask if the whole set should be ignored |
| | 252 | if (asked == JOptionPane.DEFAULT_OPTION) { |
| | 253 | String[] a = new String[] {tr("Whole group"), tr("Single elements"), tr("Nothing")}; |
| | 254 | asked = JOptionPane.showOptionDialog(MainApplication.getMainFrame(), tr("Ignore whole group or individual elements?"), |
| | 255 | tr("Ignoring elements"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, |
| | 256 | a, a[1]); |
| | 257 | } |
| | 258 | if (asked == JOptionPane.YES_NO_OPTION) { |
| | 259 | ValidatorTreePanel.visitTestErrors(node, err -> { |
| | 260 | err.setIgnored(true); |
| | 261 | changed.set(true); |
| | 262 | state.add(depth == 1 ? err.getIgnoreSubGroup() : err.getIgnoreGroup()); |
| | 263 | }, processedNodes); |
| | 264 | for (String s : state) { |
| | 265 | OsmValidator.addIgnoredError(s); |
| | 266 | } |
| | 267 | continue; |
| | 268 | } else if (asked == JOptionPane.CANCEL_OPTION || asked == JOptionPane.CLOSED_OPTION) { |
| | 269 | continue; |
| | 270 | } |