diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2010-12-15 16:19:28 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2010-12-15 16:19:28 +0000 |
| commit | 70201e92aa1e700d49279871f2b84082750b8ed8 (patch) | |
| tree | 1886fcdf8ad20d73b92bf4f4bfd3ab1406ba4c66 /src/layer-manager.cpp | |
| parent | Fix mask luminance calculation, so the coeffs add up to 1 (diff) | |
| parent | Win32 post-GSoC fixups. (diff) | |
| download | inkscape-70201e92aa1e700d49279871f2b84082750b8ed8.tar.gz inkscape-70201e92aa1e700d49279871f2b84082750b8ed8.zip | |
Merge from trunk (again)
(bzr r9508.1.72)
Diffstat (limited to 'src/layer-manager.cpp')
| -rw-r--r-- | src/layer-manager.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/layer-manager.cpp b/src/layer-manager.cpp index 1e1bb8c33..95cefc229 100644 --- a/src/layer-manager.cpp +++ b/src/layer-manager.cpp @@ -3,6 +3,7 @@ * to a particular desktop * * Copyright 2006 MenTaLguY <mental@rydia.net> + * Abhishek Sharma * * Released under GNU GPL, read the file 'COPYING' for more information */ @@ -183,7 +184,7 @@ void LayerManager::renameLayer( SPObject* obj, gchar const *label, bool uniquify } std::set<Glib::ustring> currentNames; - GSList const *layers=sp_document_get_resource_list(_document, "layer"); + GSList const *layers=_document->getResourceList("layer"); SPObject *root=_desktop->currentRoot(); if ( root ) { for ( GSList const *iter=layers ; iter ; iter = iter->next ) { @@ -218,7 +219,7 @@ void LayerManager::_setDocument(SPDocument *document) { } _document = document; if (document) { - _resource_connection = sp_document_resources_changed_connect(document, "layer", sigc::mem_fun(*this, &LayerManager::_rebuild)); + _resource_connection = document->connectResourcesChanged("layer", sigc::mem_fun(*this, &LayerManager::_rebuild)); } _rebuild(); } @@ -248,7 +249,7 @@ void LayerManager::_rebuild() { if (!_document) // http://sourceforge.net/mailarchive/forum.php?thread_name=5747bce9a7ed077c1b4fc9f0f4f8a5e0%40localhost&forum_name=inkscape-devel return; - GSList const *layers = sp_document_get_resource_list(_document, "layer"); + GSList const *layers = _document->getResourceList("layer"); SPObject *root=_desktop->currentRoot(); if ( root ) { _addOne(root); @@ -269,13 +270,15 @@ void LayerManager::_rebuild() { if ( group->layerMode() == SPGroup::LAYER ) { // If we have a layer-group as the one or a parent, ensure it is listed as a valid layer. needsAdd &= ( g_slist_find(const_cast<GSList *>(layers), curr) != NULL ); - if ( (!(group->repr)) || (!(group->repr->parent())) ) { + // XML Tree being used here directly while it shouldn't be... + if ( (!(group->getRepr())) || (!(group->getRepr()->parent())) ) { needsAdd = false; } } else { // If a non-layer group is a parent of layer groups, then show it also as a layer. // TODO add the magic Inkscape group mode? - if ( group->repr && group->repr->parent() ) { + // XML Tree being used directly while it shouldn't be... + if ( group->getRepr() && group->getRepr()->parent() ) { additional.insert(group); } else { needsAdd = false; |
