Changeset 17626 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2021-03-21T16:21:39+01:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainFrame.java
r16438 r17626 166 166 public void refreshTitle() { 167 167 OsmDataLayer editLayer = MainApplication.getLayerManager().getEditLayer(); 168 boolean dirty = editLayer != null && (editLayer.requiresSaveToFile() 169 || (editLayer.requiresUploadToServer() && !editLayer.isUploadDiscouraged())); 168 boolean dirty = editLayer != null && editLayer.isDirty(); 170 169 String userInfo = UserIdentityManager.getInstance().getUserName(); 171 170 if (userInfo != null && Config.getPref().getBoolean("draw.show-user", false)) -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r17458 r17626 708 708 Layer layer = (Layer) value; 709 709 JLabel label = (JLabel) super.getTableCellRendererComponent(table, 710 layer.get Name(), isSelected, hasFocus, row, column);710 layer.getLabel(), isSelected, hasFocus, row, column); 711 711 if (isActiveLayer(layer)) { 712 712 label.setFont(label.getFont().deriveFont(Font.BOLD)); -
trunk/src/org/openstreetmap/josm/gui/layer/Layer.java
r16553 r17626 312 312 313 313 /** 314 * Replies a label for this layer useful for UI elements. Defaults to the layer name 315 * @return a label for this layer 316 * @since 17626 317 */ 318 public String getLabel() { 319 return getName(); 320 } 321 322 /** 314 323 * Replies the name of the layer 315 324 * -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r17584 r17626 1060 1060 } 1061 1061 1062 /** 1063 * Determines if this layer is "dirty", i.e., requires save or upload 1064 * @return if this layer is "dirty" 1065 * @since 17626 1066 */ 1067 public boolean isDirty() { 1068 return requiresSaveToFile() || (requiresUploadToServer() && !isUploadDiscouraged()); 1069 } 1070 1071 @Override 1072 public String getLabel() { 1073 String label = super.getLabel(); 1074 if (this.isDirty()) { 1075 label += " *"; 1076 } 1077 if (this.getDataSet().isEmpty()) { 1078 // U+2205 EMPTY SET 1079 label += " \u2205"; 1080 } 1081 return label; 1082 } 1083 1062 1084 @Override 1063 1085 public void onPostLoadFromFile() {
Note:
See TracChangeset
for help on using the changeset viewer.