Changeset 5712 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2013-02-12T23:10:23+01:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/dialogs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r5709 r5712 74 74 import org.openstreetmap.josm.gui.layer.Layer; 75 75 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 76 import org.openstreetmap.josm.gui.util.GuiHelper; 76 77 import org.openstreetmap.josm.gui.widgets.DisableShortcutsOnFocusGainedTextField; 77 78 import org.openstreetmap.josm.gui.widgets.ListPopupMenu; … … 678 679 679 680 @Override 680 public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) { 681 setEnabled(newSelection != null && !newSelection.isEmpty()); 681 public void selectionChanged(final Collection<? extends OsmPrimitive> newSelection) { 682 GuiHelper.runInEDT(new Runnable() { 683 @Override 684 public void run() { 685 setEnabled(newSelection != null && !newSelection.isEmpty()); 686 } 687 }); 682 688 } 683 689 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java
r5495 r5712 42 42 import org.openstreetmap.josm.gui.layer.Layer; 43 43 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 44 import org.openstreetmap.josm.gui.util.GuiHelper; 44 45 import org.openstreetmap.josm.tools.ImageProvider; 45 46 import org.openstreetmap.josm.tools.Shortcut; … … 127 128 public void refresh(Collection<? extends OsmPrimitive> fromPrimitives) { 128 129 model.populate(fromPrimitives); 129 if(model.getRowCount() != 0) { 130 setTitle(trn("{0} Author", "{0} Authors", model.getRowCount() , model.getRowCount())); 131 } else { 132 setTitle(tr("Authors")); 133 } 130 GuiHelper.runInEDT(new Runnable() { 131 @Override 132 public void run() { 133 if (model.getRowCount() != 0) { 134 setTitle(trn("{0} Author", "{0} Authors", model.getRowCount() , model.getRowCount())); 135 } else { 136 setTitle(tr("Authors")); 137 } 138 } 139 }); 134 140 } 135 141 … … 305 311 } 306 312 Collections.sort(data); 307 fireTableDataChanged(); 313 GuiHelper.runInEDTAndWait(new Runnable() { 314 @Override 315 public void run() { 316 fireTableDataChanged(); 317 } 318 }); 308 319 } 309 320
Note:
See TracChangeset
for help on using the changeset viewer.