summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/PatchTreeWindow.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/PatchTreeWindow.cpp b/src/gui/PatchTreeWindow.cpp
index cf422409..15c33550 100644
--- a/src/gui/PatchTreeWindow.cpp
+++ b/src/gui/PatchTreeWindow.cpp
@@ -110,7 +110,13 @@ PatchTreeWindow::add_patch(SharedPtr<PatchModel> pm)
}
}
- pm->signal_property.connect(sigc::bind(sigc::mem_fun(this, &PatchTreeWindow::patch_property_changed), pm->path()));
+ pm->signal_property.connect(sigc::bind(
+ sigc::mem_fun(this, &PatchTreeWindow::patch_property_changed),
+ pm->path()));
+
+ pm->signal_destroyed.connect(sigc::bind(
+ sigc::mem_fun(this, &PatchTreeWindow::remove_patch),
+ pm->path()));
}