2 Sep
2007
2 Sep
'07
4:40 p.m.
I've had some struggle in signals and stuff. I found this in the code:
_close_button.signal_clicked() .connect(sigc::mem_fun(*this, &LayerPropertiesDialog::_close)); (dialogs/layer-properties.cpp)
Why is this connection not saved? Is that not necessary? It seems to me that this is buggy. When the layer window is deleted, the connection is not disconnected and when the signal is emitted it will call _close with a corrupt "this" value. (this will never happen probably because the button is on the dialog itself, but still)
Thanks for some light on this, Johan
P.S. Why is there a function signal_clicked() to get the signal? In my code I just make the sigc::signal public (see /ui/widget/random.h). Is that bad?