Ignore:
Timestamp:
2016-01-17T20:09:12+01:00 (8 years ago)
Author:
bastiK
Message:

applied #12391 - saving renamed layer replaces name (patch by kolesar + cosmetic changes)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java

    r9230 r9510  
    8686                if (Main.platform.rename(file, newFile)) {
    8787                    layer.setAssociatedFile(newFile);
    88                     nameText = newFile.getName();
     88                    if (!layer.isRenamed()) {
     89                        nameText = newFile.getName();
     90                    }
    8991                } else {
    9092                    JOptionPane.showMessageDialog(
     
    98100            }
    99101        }
    100         layer.setName(nameText);
     102        layer.rename(nameText);
    101103        Main.parent.repaint();
    102104    }
Note: See TracChangeset for help on using the changeset viewer.