Code

add destructor to LayerManager that disconnects it signals. see bug: [ 1720871 ]...
authorjohanengelen <johanengelen@users.sourceforge.net>
Sat, 3 Nov 2007 18:02:54 +0000 (18:02 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Sat, 3 Nov 2007 18:02:54 +0000 (18:02 +0000)
src/layer-manager.cpp
src/layer-manager.h

index 34a909a796aef25edb2f10746a98f5b29b5133eb..86c8e4fcd8be5d03170a1cec2d7cc65891946cca 100644 (file)
@@ -74,6 +74,12 @@ LayerManager::LayerManager(SPDesktop *desktop)
     _setDocument(desktop->doc());
 }
 
+LayerManager::~LayerManager()
+{
+    _layer_connection.disconnect();
+    _document_connection.disconnect();
+    _resource_connection.disconnect();
+}
 
 void LayerManager::setCurrentLayer( SPObject* obj )
 {
index 0dec95c978b82218ab985715c1f344c9fcc40f73..514677fd03a944ed713fe7c7717f551223d79aa7 100644 (file)
@@ -26,6 +26,7 @@ class LayerManager : public DocumentSubset,
 {
 public:
     LayerManager(SPDesktop *desktop);
+    ~LayerManager();
 
     void setCurrentLayer( SPObject* obj );
     void renameLayer( SPObject* obj, gchar const *label );