summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 533909e)
raw | patch | inline | side by side (parent: 533909e)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 20 Sep 2008 21:02:26 +0000 (21:02 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 20 Sep 2008 21:02:26 +0000 (21:02 +0000) |
src/selection-describer.cpp | patch | blob | history | |
src/selection-describer.h | patch | blob | history |
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();
index cd892bd14585d3f688620fb15fa3cfef1bd3b9f0..91948c2fd325f0bb0bf7da2694ab6a7b39bdd105 100644 (file)
class SelectionDescriber : public sigc::trackable {
public:
SelectionDescriber(Inkscape::Selection *selection, MessageStack *stack);
+ ~SelectionDescriber();
private:
void _updateMessageFromSelection(Inkscape::Selection *selection);
+ sigc::connection *_selection_changed_connection;
+
MessageContext _context;
};