Delete all callbacks from a widget, when it will be destroyed
This commit is contained in:
parent
15793868fe
commit
9b7918f2f6
|
@ -1,3 +1,6 @@
|
|||
2016-07-30 Markus Gans <guru.mail@muenster.de>
|
||||
* Delete all callbacks from a widget, when it will be destroyed
|
||||
|
||||
2016-07-28 Markus Gans <guru.mail@muenster.de>
|
||||
* Improvements for the window focus
|
||||
|
||||
|
|
|
@ -103,8 +103,8 @@ FWidget::FWidget (FWidget* parent)
|
|||
//----------------------------------------------------------------------
|
||||
FWidget::~FWidget() // destructor
|
||||
{
|
||||
delCallbacks();
|
||||
processDestroy();
|
||||
|
||||
FApplication::removeQueuedEvent(this);
|
||||
|
||||
if ( this == getClickedWidget() )
|
||||
|
@ -1121,6 +1121,14 @@ void FWidget::delCallback (FWidget* cb_instance)
|
|||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline void FWidget::delCallbacks()
|
||||
{
|
||||
// delete all callbacks from this widget
|
||||
memberCallbackObjects.clear(); // member function pointer
|
||||
callbackObjects.clear(); // function pointer
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::emitCallback (FString emit_signal)
|
||||
{
|
||||
|
|
|
@ -352,6 +352,7 @@ class FWidget : public FObject, public FTerm
|
|||
, void* = null );
|
||||
void delCallback (FCallback);
|
||||
void delCallback (FWidget*);
|
||||
void delCallbacks();
|
||||
void emitCallback (FString);
|
||||
|
||||
void addAccelerator (int);
|
||||
|
|
Loading…
Reference in New Issue