From 9aced3f49acbc5cebca1ea980be19e80f3ea87bf Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Thu, 25 Nov 2021 13:23:24 +0100 Subject: [PATCH] desktop: don't close edit dialog when save is cancelled In the edit dialog, when OK is pressed, anotehr modal dialog opens and asks if the template should be saved. If the answer is negative, return to the edit dialog rather than closing it abandoning the changes. To abandon the changes, there is still the cancel buttton of the edit dialog. Signed-off-by: Robert C. Helling --- desktop-widgets/templateedit.cpp | 1 + desktop-widgets/templateedit.ui | 16 ---------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/desktop-widgets/templateedit.cpp b/desktop-widgets/templateedit.cpp index 2dc181522..ea2d0688d 100644 --- a/desktop-widgets/templateedit.cpp +++ b/desktop-widgets/templateedit.cpp @@ -180,6 +180,7 @@ void TemplateEdit::saveSettings() } if (templateOptions.color_palette_index == CUSTOM) custom_colors = templateOptions.color_palette; + emit accept(); } } } diff --git a/desktop-widgets/templateedit.ui b/desktop-widgets/templateedit.ui index bfb60d47a..1b23b82e0 100644 --- a/desktop-widgets/templateedit.ui +++ b/desktop-widgets/templateedit.ui @@ -571,22 +571,6 @@ - - buttonBox - accepted() - TemplateEdit - accept() - - - 248 - 254 - - - 157 - 274 - - - buttonBox rejected()