diff options
| author | John Smith <john.smith7545@yahoo.com> | 2012-10-12 05:39:08 +0000 |
|---|---|---|
| committer | John Smith <john.smith7545@yahoo.com> | 2012-10-12 05:39:08 +0000 |
| commit | c384a6116dd087856bd91806e9f8fb5e0eaa6dd8 (patch) | |
| tree | 6f9203b390701aa7084c3995f47de06fdf2d498a /src/ui/dialog/layer-properties.cpp | |
| parent | Fix for 177931 : Shift click layer icons to trigger solo (diff) | |
| download | inkscape-c384a6116dd087856bd91806e9f8fb5e0eaa6dd8.tar.gz inkscape-c384a6116dd087856bd91806e9f8fb5e0eaa6dd8.zip | |
Fix for 1019974 : Default layer names are inconsistent
(bzr r11785)
Diffstat (limited to 'src/ui/dialog/layer-properties.cpp')
| -rw-r--r-- | src/ui/dialog/layer-properties.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ui/dialog/layer-properties.cpp b/src/ui/dialog/layer-properties.cpp index 35a235dbc..4f9edf774 100644 --- a/src/ui/dialog/layer-properties.cpp +++ b/src/ui/dialog/layer-properties.cpp @@ -331,8 +331,11 @@ void LayerPropertiesDialog::Rename::perform(LayerPropertiesDialog &dialog) { void LayerPropertiesDialog::Create::setup(LayerPropertiesDialog &dialog) { dialog.set_title(_("Add Layer")); - //TODO: find an unused layer number, forming name from _("Layer ") + "%d" - dialog._layer_name_entry.set_text(_("Layer")); + + // Set the initial name to the "next available" layer name + LayerManager *mgr = dialog._desktop->layer_manager; + Glib::ustring newName = mgr->getNextLayerName(NULL, dialog._desktop->currentLayer()->label()); + dialog._layer_name_entry.set_text(newName.c_str()); dialog._apply_button.set_label(_("_Add")); dialog._setup_position_controls(); } |
