From 7961a61efa8ed97a98d06dd2c08bd686faba8384 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Wed, 1 Jun 2016 16:03:29 +0200 Subject: Invalidate the AutoText Dialog after selection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes: - added invalidate call after entry selection and expand Behaviour before patch (Linux): 1. Open Writer 2. Open AutoText Dialog: Tools > AutoText 3. Expand/select entry Insert button is still disabled / entry is not expanded. To force repaint you had to use mouse scroll. Change-Id: I814db71dea02273998f675c3b140d554f2e109ba Reviewed-on: https://gerrit.libreoffice.org/25783 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/ui/misc/glossary.cxx | 7 +++++++ sw/source/uibase/inc/glossary.hxx | 2 ++ 2 files changed, 9 insertions(+) diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 16b8357b5d94..e477c6a60636 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -316,6 +316,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, GrpSelect, SvTreeListBox *, pBox, void ) aReq.AppendItem(SfxStringItem(FN_SET_ACT_GLOSSARY, sTemp)); aReq.Done(); } + Invalidate(InvalidateFlags::Update); } void SwGlossaryDlg::Apply() @@ -1014,6 +1015,12 @@ TriState SwGlTreeListBox::NotifyCopyingOrMoving( return TRISTATE_FALSE; // otherwise the entry is being set automatically } +void SwGlTreeListBox::ExpandedHdl() +{ + Invalidate(InvalidateFlags::Update); + SvTreeListBox::ExpandedHdl(); +} + OUString SwGlossaryDlg::GetCurrGrpName() const { SvTreeListEntry* pEntry = m_pCategoryBox->FirstSelected(); diff --git a/sw/source/uibase/inc/glossary.hxx b/sw/source/uibase/inc/glossary.hxx index ccc9759274c7..2cd8d7b92d44 100644 --- a/sw/source/uibase/inc/glossary.hxx +++ b/sw/source/uibase/inc/glossary.hxx @@ -80,6 +80,8 @@ public: virtual void RequestHelp( const HelpEvent& rHEvt ) override; virtual Size GetOptimalSize() const override; void Clear(); + + virtual void ExpandedHdl() override; }; class SwOneExampleFrame; -- cgit