Blame SOURCES/0001-tdf-137209-unparent-widgets-in-fragment-dtor.patch

d289e2
From 96fc7531331f45a314416000150b1141e5686f38 Mon Sep 17 00:00:00 2001
d289e2
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
d289e2
Date: Fri, 2 Oct 2020 16:21:02 +0100
d289e2
Subject: [PATCH] tdf#137209 unparent widgets in fragment dtor
d289e2
d289e2
Change-Id: I819514fd2b97e2cc8daad71a7f3b0b27afe6136d
d289e2
---
d289e2
 sw/source/ui/dbui/createaddresslistdialog.cxx | 8 ++++++++
d289e2
 1 file changed, 8 insertions(+)
d289e2
d289e2
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
d289e2
index ae4d354ea29d..994a6045cea5 100644
d289e2
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
d289e2
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
d289e2
@@ -53,11 +53,13 @@ struct SwAddressFragment
d289e2
     std::unique_ptr<weld::Builder> m_xBuilder;
d289e2
     std::unique_ptr<weld::Label> m_xLabel;
d289e2
     std::unique_ptr<weld::Entry> m_xEntry;
d289e2
+    weld::Container* m_pGrid;
d289e2
 
d289e2
     SwAddressFragment(weld::Container* pGrid, int nLine)
d289e2
         : m_xBuilder(Application::CreateBuilder(pGrid, "modules/swriter/ui/addressfragment.ui"))
d289e2
         , m_xLabel(m_xBuilder->weld_label("label"))
d289e2
         , m_xEntry(m_xBuilder->weld_entry("entry"))
d289e2
+        , m_pGrid(pGrid)
d289e2
     {
d289e2
         m_xLabel->set_grid_left_attach(0);
d289e2
         m_xLabel->set_grid_top_attach(nLine);
d289e2
@@ -65,6 +67,12 @@ struct SwAddressFragment
d289e2
         m_xEntry->set_grid_left_attach(1);
d289e2
         m_xEntry->set_grid_top_attach(nLine);
d289e2
     }
d289e2
+
d289e2
+    virtual ~SwAddressFragment()
d289e2
+    {
d289e2
+        m_pGrid->move(m_xEntry.get(), nullptr);
d289e2
+        m_pGrid->move(m_xLabel.get(), nullptr);
d289e2
+    }
d289e2
 };
d289e2
 
d289e2
 class SwAddressControl_Impl
d289e2
-- 
d289e2
2.26.2
d289e2