Changeset 18964 in josm for trunk/src/org


Ignore:
Timestamp:
2024-01-30T15:58:03+01:00 (10 months ago)
Author:
GerdP
Message:

fix #23440: Validation results may not be refreshed on upload
The patch checks if the validator dialog is already showing. If yes, it is always updated.
An empty dialog is only suppressed when there was no dialog showing and there are no errors and the validation was triggered by the upload action.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/ValidationTask.java

    r18963 r18964  
    136136        }
    137137
    138         if (!GraphicsEnvironment.isHeadless() && MainApplication.getMap() != null && (!beforeUpload || !errors.isEmpty())) {
     138        if (!GraphicsEnvironment.isHeadless() && MainApplication.getMap() != null) {
     139            MapFrame map = MainApplication.getMap();
    139140            // update GUI on Swing EDT
    140141            GuiHelper.runInEDT(() -> {
    141                 MapFrame map = MainApplication.getMap();
     142                // see #23440 why this is inside the EDT
     143                if (!map.validatorDialog.isShowing() && errors.isEmpty() && beforeUpload)
     144                    return;
    142145                map.validatorDialog.unfurlDialog();
    143146                map.validatorDialog.tree.setErrors(errors);
Note: See TracChangeset for help on using the changeset viewer.