diff options
| author | John Smith <john.smith7545@yahoo.com> | 2012-03-02 07:29:17 +0000 |
|---|---|---|
| committer | John Smith <removethis.john.q.public@bigmail.com> | 2012-03-02 07:29:17 +0000 |
| commit | e9f2d1dd2e4f7562d153a31dea785f5ac16d1713 (patch) | |
| tree | 42f344b32b6644dbfea2e33cd912a4d7b27bfb01 /src/ui/dialog/layers.cpp | |
| parent | Fix for 944524 Layers - Group buttons and make style consistent (diff) | |
| download | inkscape-e9f2d1dd2e4f7562d153a31dea785f5ac16d1713.tar.gz inkscape-e9f2d1dd2e4f7562d153a31dea785f5ac16d1713.zip | |
Fix for 168351 : layer rename doesn't update layers dialog
(bzr r11039)
Diffstat (limited to 'src/ui/dialog/layers.cpp')
| -rw-r--r-- | src/ui/dialog/layers.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ui/dialog/layers.cpp b/src/ui/dialog/layers.cpp index 383874b28..b1500c7fd 100644 --- a/src/ui/dialog/layers.cpp +++ b/src/ui/dialog/layers.cpp @@ -280,10 +280,16 @@ bool LayersPanel::_checkForUpdated(const Gtk::TreePath &/*path*/, const Gtk::Tre { bool stopGoing = false; Gtk::TreeModel::Row row = *iter; - Glib::ustring tmp = row[_model->_colLabel]; if ( layer == row[_model->_colObject] ) { - row[_model->_colLabel] = layer->label() ? layer->label() : layer->getId(); + /* + * We get notified of layer update here (from layer->setLabel()) before layer->label() is set + * with the correct value (sp-object bug?). So use the inkscape:label attribute instead which + * has the correct value (bug #168351) + */ + //row[_model->_colLabel] = layer->label() ? layer->label() : layer->getId(); + gchar const *label = layer->getAttribute("inkscape:label"); + row[_model->_colLabel] = label ? label : layer->getId(); row[_model->_colVisible] = SP_IS_ITEM(layer) ? !SP_ITEM(layer)->isHidden() : false; row[_model->_colLocked] = SP_IS_ITEM(layer) ? SP_ITEM(layer)->isLocked() : false; @@ -523,7 +529,6 @@ void LayersPanel::_handleRowChange( Gtk::TreeModel::Path const& /*path*/, Gtk::T Glib::ustring tmp = row[_model->_colLabel]; if ( oldLabel && oldLabel[0] && !tmp.empty() && (tmp != oldLabel) ) { _desktop->layer_manager->renameLayer( obj, tmp.c_str(), FALSE ); - row[_model->_colLabel] = obj->label(); } } } |
