diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-09-26 16:34:43 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-09-26 20:51:55 +0200 |
commit | eb2b96f9c686401066f420d0f21937fc14eee1f7 (patch) | |
tree | b4457f1bbf5c41db9705203c6cb52d0f4f39f395 | |
parent | f35825e85f59e0fd155c68d63260169cd3cb38c9 (diff) |
Resolves: tdf#127416 unparent iconset block on dtor
otherwise gtk keeps the widgets around
Change-Id: I6227662e0a8a4d5a88f4ff6199d6fa06e5be8fe0
Reviewed-on: https://gerrit.libreoffice.org/79648
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/ui/condformat/condformatdlgentry.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 6214ca939c5f..229b4a05e931 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -1281,10 +1281,12 @@ private: std::unique_ptr<weld::Label> mxFtEntry; std::unique_ptr<weld::Entry> mxEdEntry; std::unique_ptr<weld::ComboBox> mxLbEntryType; + weld::Container* mpContainer; public: ScIconSetFrmtDataEntry(weld::Container* pParent, ScIconSetType eType, const ScDocument* pDoc, sal_Int32 i, const ScColorScaleEntry* pEntry = nullptr); + ~ScIconSetFrmtDataEntry(); void Show() { mxGrid->show(); } void Hide() { mxGrid->hide(); } void set_grid_top_attach(int nTop) @@ -1305,6 +1307,7 @@ ScIconSetFrmtDataEntry::ScIconSetFrmtDataEntry(weld::Container* pParent, ScIconS , mxFtEntry(mxBuilder->weld_label("label")) , mxEdEntry(mxBuilder->weld_entry("entry")) , mxLbEntryType(mxBuilder->weld_combo_box("listbox")) + , mpContainer(pParent) { mxImgIcon->set_from_icon_name(ScIconSetFormat::getIconName(eType, i)); if(pEntry) @@ -1337,6 +1340,11 @@ ScIconSetFrmtDataEntry::ScIconSetFrmtDataEntry(weld::Container* pParent, ScIconS } } +ScIconSetFrmtDataEntry::~ScIconSetFrmtDataEntry() +{ + mpContainer->move(mxGrid.get(), nullptr); +} + ScColorScaleEntry* ScIconSetFrmtDataEntry::CreateEntry(ScDocument* pDoc, const ScAddress& rPos) const { sal_Int32 nPos = mxLbEntryType->get_active(); |