From e73b2bc4e6fdaba3098fa2c701342e1df112514c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCl=C5=9Fah=20K=C3=B6se?= Date: Mon, 17 Jul 2023 11:27:08 +0300 Subject: [PATCH] Prevent to open multiple Theme Color Edit dialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gülşah Köse Change-Id: Ibf4db096b44ce941140a12d003b89b636f5e7224 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154514 Tested-by: Jenkins Reviewed-by: Szymon Kłos --- svx/source/dialog/ThemeDialog.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/svx/source/dialog/ThemeDialog.cxx b/svx/source/dialog/ThemeDialog.cxx index 8af6f5975df2..cda60a457b04 100644 --- a/svx/source/dialog/ThemeDialog.cxx +++ b/svx/source/dialog/ThemeDialog.cxx @@ -88,7 +88,10 @@ void ThemeDialog::runThemeColorEditDialog() auto pDialog = std::make_shared(mpWindow, *mpCurrentColorSet); weld::DialogController::runAsync(pDialog, [this, pDialog](sal_uInt32 nResult) { if (nResult != RET_OK) + { + mxAdd->set_sensitive(true); return; + } auto aColorSet = pDialog->getColorSet(); if (!aColorSet.getName().isEmpty()) { @@ -102,6 +105,7 @@ void ThemeDialog::runThemeColorEditDialog() mpCurrentColorSet = std::make_shared(maColorSets[maColorSets.size() - 1]); } + mxAdd->set_sensitive(true); }); } @@ -110,6 +114,7 @@ IMPL_LINK(ThemeDialog, ButtonClicked, weld::Button&, rButton, void) if (mpCurrentColorSet && mxAdd.get() == &rButton) { runThemeColorEditDialog(); + mxAdd->set_sensitive(false); } }