Kaydet (Commit) 19ea033f authored tarafından Michael Meeks's avatar Michael Meeks

tdf#91138 - hold reference until idle dispose.

Change-Id: Ibfa9a95d27796f8b44dc610db8daa71b968a7988
üst b01554bc
...@@ -42,9 +42,7 @@ public: ...@@ -42,9 +42,7 @@ public:
~PopupWindowControllerImpl(); ~PopupWindowControllerImpl();
void SetPopupWindow( vcl::Window* pPopupWindow, ToolBox* pToolBox ); void SetPopupWindow( vcl::Window* pPopupWindow, ToolBox* pToolBox );
DECL_LINK( WindowEventListener, VclSimpleEvent* ); DECL_LINK( WindowEventListener, VclSimpleEvent* );
DECL_STATIC_LINK( PopupWindowControllerImpl, AsyncDeleteWindowHdl, vcl::Window* );
private: private:
VclPtr<vcl::Window> mpPopupWindow; VclPtr<vcl::Window> mpPopupWindow;
...@@ -68,7 +66,7 @@ void PopupWindowControllerImpl::SetPopupWindow( vcl::Window* pPopupWindow, ToolB ...@@ -68,7 +66,7 @@ void PopupWindowControllerImpl::SetPopupWindow( vcl::Window* pPopupWindow, ToolB
if( mpPopupWindow ) if( mpPopupWindow )
{ {
mpPopupWindow->RemoveEventListener( LINK( this, PopupWindowControllerImpl, WindowEventListener ) ); mpPopupWindow->RemoveEventListener( LINK( this, PopupWindowControllerImpl, WindowEventListener ) );
Application::PostUserEvent( LINK( this, PopupWindowControllerImpl, AsyncDeleteWindowHdl ), mpPopupWindow ); mpPopupWindow.disposeAndClear();
} }
mpPopupWindow = pPopupWindow; mpPopupWindow = pPopupWindow;
mpToolBox = pToolBox; mpToolBox = pToolBox;
...@@ -122,14 +120,6 @@ IMPL_LINK( PopupWindowControllerImpl, WindowEventListener, VclSimpleEvent*, pEve ...@@ -122,14 +120,6 @@ IMPL_LINK( PopupWindowControllerImpl, WindowEventListener, VclSimpleEvent*, pEve
} }
IMPL_STATIC_LINK( PopupWindowControllerImpl, AsyncDeleteWindowHdl, vcl::Window*, pWindow )
{
pWindow->disposeOnce();
return 0;
}
// class PopupWindowController // class PopupWindowController
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment