diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-10-06 10:40:38 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-10-06 14:42:48 +0200 |
commit | 19f331ca6aa87a438b1eeabef72978ddbfb0e747 (patch) | |
tree | 1ba7ef9025fbeb62c2898a2680fab9b18915ae13 /sc/source | |
parent | c43393135a6cd0f748433fc39ff45938b82e0464 (diff) |
reparent to nothing to break gtk ownership cycle
which is our usual solution, instead of using less common flag
Change-Id: I9dd54a161df53a5b6ffb0b7655e510a6cc4c4824
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104018
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/dbgui/sortkeydlg.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/inc/sortkeydlg.hxx | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx b/sc/source/ui/dbgui/sortkeydlg.cxx index db218cf8678f..ec81bda34fc1 100644 --- a/sc/source/ui/dbgui/sortkeydlg.cxx +++ b/sc/source/ui/dbgui/sortkeydlg.cxx @@ -13,13 +13,19 @@ ScSortKeyItem::ScSortKeyItem(weld::Container* pParent) : m_xBuilder(Application::CreateBuilder(pParent, "modules/scalc/ui/sortkey.ui")) - , m_xFrame(m_xBuilder->weld_frame("SortKeyFrame", true)) + , m_xFrame(m_xBuilder->weld_frame("SortKeyFrame")) , m_xLbSort(m_xBuilder->weld_combo_box("sortlb")) , m_xBtnUp(m_xBuilder->weld_radio_button("up")) , m_xBtnDown(m_xBuilder->weld_radio_button("down")) + , m_pParent(pParent) { } +ScSortKeyItem::~ScSortKeyItem() +{ + m_pParent->move(m_xFrame.get(), nullptr); +} + void ScSortKeyItem::DisableField() { m_xFrame->set_sensitive(false); diff --git a/sc/source/ui/inc/sortkeydlg.hxx b/sc/source/ui/inc/sortkeydlg.hxx index 1ac699970d4c..85b6da332e20 100644 --- a/sc/source/ui/inc/sortkeydlg.hxx +++ b/sc/source/ui/inc/sortkeydlg.hxx @@ -23,8 +23,10 @@ struct ScSortKeyItem std::unique_ptr<weld::ComboBox> m_xLbSort; std::unique_ptr<weld::RadioButton> m_xBtnUp; std::unique_ptr<weld::RadioButton> m_xBtnDown; + weld::Container* m_pParent; ScSortKeyItem(weld::Container* pParent); + ~ScSortKeyItem(); void DisableField(); void EnableField(); |