On 22-9-2013 0:57, Sebastian Götte wrote:
On 09/22/2013 12:04 AM, Krzysztof Kosiński wrote:
2013/9/21 Sebastian Götte <jaseg@...2974...>:
On 09/21/2013 03:36 PM, Arshdeep Singh wrote:
How can I keep track of objects being removed from the selection ?
[ I have been digging through the desktop.cpp/inkscape.cpp/selection.cpp files and couldn't find any noteworthy construct that let me do it. ]
In my connector-wip branch [0] I added a "selected" signal to SPObject. This could be used for that purpose.
As I mentioned some time ago, this is a very bad idea. It would be better to add this signal on the Inkscape::Selection object. Adding a "selected" signal to SPObject introduces UI functionality into the SP tree, which is a design error.
I disagree. The interesting action is the selection change of a particular object. To introduce a global signal covering any selection changes and then filtering for a single object is not the right way to solve this. The object itself is the natural place to "bounce" this signal between the listener and the emitter.
Introducing this kind of UI code into the SPObject tree is not problematic by itself as long as it is only used by UI code.
Can you explain to me, for what functionality do you need the "selected" signal?
regards, Johan