index 6d80cfe5c0152a1178ea7b23438e04d0d262e78f..bd84030543fb2a6a62b45046a16fe464c1d28613 100644 (file)
SelectionDescriber::SelectionDescriber(Inkscape::Selection *selection, MessageStack *stack)
: _context(stack)
{
- selection->connectChanged(sigc::mem_fun(*this, &SelectionDescriber::_updateMessageFromSelection));
+ _selection_changed_connection = new sigc::connection (
+ selection->connectChanged(
+ sigc::mem_fun(*this, &SelectionDescriber::_updateMessageFromSelection)));
_updateMessageFromSelection(selection);
}
+SelectionDescriber::~SelectionDescriber()
+{
+ _selection_changed_connection->disconnect();
+ delete _selection_changed_connection;
+}
+
void SelectionDescriber::_updateMessageFromSelection(Inkscape::Selection *selection) {
GSList const *items = selection->itemList();