summaryrefslogtreecommitdiffstats
path: root/src/dialogs/layers-panel.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2006-05-27 04:26:51 +0000
committerjoncruz <joncruz@users.sourceforge.net>2006-05-27 04:26:51 +0000
commit265d3bfecbec14917ebb262ce5ea58bbaf1d48a2 (patch)
tree660fa2ff6d4e3fb4cc5fe822380fcf5bf25cdd08 /src/dialogs/layers-panel.cpp
parentpatch from bug 1495755 (diff)
downloadinkscape-265d3bfecbec14917ebb262ce5ea58bbaf1d48a2.tar.gz
inkscape-265d3bfecbec14917ebb262ce5ea58bbaf1d48a2.zip
Prevent layer name duplication
(bzr r1024)
Diffstat (limited to 'src/dialogs/layers-panel.cpp')
-rw-r--r--src/dialogs/layers-panel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dialogs/layers-panel.cpp b/src/dialogs/layers-panel.cpp
index a7ad817cf..31e9823c6 100644
--- a/src/dialogs/layers-panel.cpp
+++ b/src/dialogs/layers-panel.cpp
@@ -576,8 +576,8 @@ void LayersPanel::_handleRowChange( Gtk::TreeModel::Path const& path, Gtk::TreeM
gchar const* oldLabel = obj->label();
Glib::ustring tmp = row[_model->_colLabel];
if ( oldLabel && oldLabel[0] && !tmp.empty() && (tmp != oldLabel) ) {
- // TODO fix name collision bug
- obj->setLabel(tmp.c_str());
+ _mgr->renameLayer( obj, tmp.c_str() );
+ row[_model->_colLabel] = obj->label();
}
}
}