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>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user