From 093846124b06961daa400735eaf0d50115cf8690 Mon Sep 17 00:00:00 2001 From: Michael Horn Date: Fri, 20 Mar 2015 19:21:51 -0700 Subject: tdf#90095 Fixed wrong behavior of template delete dialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The template delete dialog was coded in such a way that the default behavior was to delete the template/folder unless the user pressed no. This caused the template to be deleted if the dialog was closed using the "x" button. I changed the logic so that the dialog will only delete the template if the user presses yes. Any other button press will do nothing but close the dialog. Change-Id: I7977fd48b3e0cc440cc1e15056b448e7ae23476f Reviewed-on: https://gerrit.libreoffice.org/14937 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sfx2/source/doc/templatedlg.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 2c3bd55979d5..a584a7d8f296 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -1160,7 +1160,7 @@ void SfxTemplateManagerDlg::OnTemplateDelete () { MessageDialog aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - if ( aQueryDlg.Execute() == RET_NO ) + if ( aQueryDlg.Execute() != RET_YES ) return; OUString aTemplateList; @@ -1245,7 +1245,7 @@ void SfxTemplateManagerDlg::OnFolderDelete() { MessageDialog aQueryDlg(this, SfxResId(STR_QMSG_SEL_FOLDER_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - if ( aQueryDlg.Execute() == RET_NO ) + if ( aQueryDlg.Execute() != RET_YES ) return; OUString aFolderList; -- cgit