sfx2/source/control/templateabstractview.cxx | 1 + sfx2/source/doc/templatedlg.cxx | 5 +++++ 2 files changed, 6 insertions(+)
New commits: commit 4599858e21925f2f5febed8eebf4f5bd0fa97163 Author: Akshay Deep <akshaydeepi...@gmail.com> Date: Thu Jun 9 08:07:27 2016 +0530 Hide Default Template icon when resetting default using toolbox menu Change-Id: I7a3e7c9413edbdfb74e0415dd7e203d65201eb08 Reviewed-on: https://gerrit.libreoffice.org/26081 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Akshay Deep <akshaydeepi...@gmail.com> diff --git a/sfx2/source/control/templateabstractview.cxx b/sfx2/source/control/templateabstractview.cxx index 5d95c37..e19621d 100644 --- a/sfx2/source/control/templateabstractview.cxx +++ b/sfx2/source/control/templateabstractview.cxx @@ -274,6 +274,7 @@ void TemplateAbstractView::RemoveDefaultTemplateIcon(const OUString& rPath) if(pViewItem->getPath().match(rPath)) { pViewItem->showDefaultIcon(false); + Invalidate(); return; } } diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 41a8740..9a6335a 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -628,6 +628,11 @@ IMPL_LINK_TYPED(SfxTemplateManagerDlg, DefaultTemplateMenuSelectHdl, Menu*, pMen sal_uInt16 nId = pMenu->GetCurItemId(); OUString aServiceName = SfxObjectShell::GetServiceNameFromFactory( mpTemplateDefaultMenu->GetItemCommand(nId)); + + OUString sPrevDefault = SfxObjectFactory::GetStandardTemplate( aServiceName ); + if(!sPrevDefault.isEmpty()) + mpLocalView->RemoveDefaultTemplateIcon(sPrevDefault); + SfxObjectFactory::SetStandardTemplate( aServiceName, OUString() ); createDefaultTemplateMenu(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits