diff --git a/src/layer-manager.cpp b/src/layer-manager.cpp
index fe0d4190484ee637ff9927f93250dd5344aa8ff7..1e1bb8c339ae9e9f9f8770e907e5ab6ac9fcc66b 100644 (file)
--- a/src/layer-manager.cpp
+++ b/src/layer-manager.cpp
{
_layer_connection = desktop->connectCurrentLayerChanged( sigc::mem_fun(*this, &LayerManager::_selectedLayerChanged) );
- sigc::bound_mem_functor1<void, Inkscape::LayerManager, Document*> first = sigc::mem_fun(*this, &LayerManager::_setDocument);
+ sigc::bound_mem_functor1<void, Inkscape::LayerManager, SPDocument*> first = sigc::mem_fun(*this, &LayerManager::_setDocument);
// This next line has problems on gcc 4.0.2
- sigc::slot<void, Document*> base2 = first;
+ sigc::slot<void, SPDocument*> base2 = first;
- sigc::slot<void,SPDesktop*,Document*> slot2 = sigc::hide<0>( base2 );
+ sigc::slot<void,SPDesktop*,SPDocument*> slot2 = sigc::hide<0>( base2 );
_document_connection = desktop->connectDocumentReplaced( slot2 );
_setDocument(desktop->doc());
_layer_connection.disconnect();
_document_connection.disconnect();
_resource_connection.disconnect();
+ _document = 0;
}
void LayerManager::setCurrentLayer( SPObject* obj )
@@ -211,7 +212,7 @@ void LayerManager::renameLayer( SPObject* obj, gchar const *label, bool uniquify
-void LayerManager::_setDocument(Document *document) {
+void LayerManager::_setDocument(SPDocument *document) {
if (_document) {
_resource_connection.disconnect();
}
LayerWatcher *eye = new LayerWatcher(this, layer, connection);
_watchers.push_back( eye );
SP_OBJECT_REPR(layer)->addObserver(*eye);
-
+
_addOne(layer);
}
}
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :