Ignore:
Timestamp:
2013-03-06T21:44:56+01:00 (12 years ago)
Author:
donvip
Message:

[josm_plugins] fix EDT violations in measurement and reltoolbox plugins

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementDialog.java

    r28898 r29344  
    2424import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
    2525import org.openstreetmap.josm.gui.help.HelpUtil;
     26import org.openstreetmap.josm.gui.util.GuiHelper;
    2627import org.openstreetmap.josm.tools.ImageProvider;
    2728import org.openstreetmap.josm.tools.Shortcut;
     
    159160            }
    160161        }
    161         selectLengthLabel.setText(NavigatableComponent.getDistText(length));
    162         segAngleLabel.setText(new DecimalFormat("#0.0").format(segAngle) + " \u00b0");
    163         selectAreaLabel.setText(NavigatableComponent.getAreaText(area));
     162       
     163        final String lengthLabel = NavigatableComponent.getDistText(length);
     164        final String angleLabel = new DecimalFormat("#0.0").format(segAngle) + " \u00b0";
     165        final String areaLabel = NavigatableComponent.getAreaText(area);
     166       
     167        GuiHelper.runInEDT(new Runnable() {
     168            @Override
     169            public void run() {
     170                selectLengthLabel.setText(lengthLabel);
     171                segAngleLabel.setText(angleLabel);
     172                selectAreaLabel.setText(areaLabel);
     173            }
     174        });
    164175        }
    165176
Note: See TracChangeset for help on using the changeset viewer.