summaryrefslogtreecommitdiff
path: root/vcl/jsdialog/jsdialogbuilder.cxx
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2023-05-19 13:45:22 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2023-07-04 20:47:15 +0200
commitd077c6bf7b1697abc977a8bea5b19cb624c4a5b1 (patch)
tree21e94ecfe6e1b82254c4ccadb2da1c4e14753384 /vcl/jsdialog/jsdialogbuilder.cxx
parent16b0da38515467bf1819ccd88027934481cc5727 (diff)
jsdialog: lazy json generation when closing tab in dialog
After profiling Writer -> Format -> Character dialog I found that full dialog update happens while creating the dialog as some of the tabs are destroyed. Instead of instant JSON generation we should add the message to the queue and send it in idle time. Problem is that we are closing the tab and it's builder so we will not be able to do it later. So using jsdialog::SendFullUpdate trigger update in parent dialog which shares the same WINDOW_ID. This behaviour can be tested in Highlight tab when switching between "Color" and "None". As previous solution was introduced for it in: commit 41a1a2f04301dc22b156b4e11767859e40473897 jsdialog: don't close dialog on tab page destroy Change-Id: I916250cf08d87c1109dc2db6dbbc1fbff7f48c07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152008 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153945 Tested-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'vcl/jsdialog/jsdialogbuilder.cxx')
-rw-r--r--vcl/jsdialog/jsdialogbuilder.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 328a03340c97..d37c5c2ffb59 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -677,8 +677,7 @@ JSInstanceBuilder::~JSInstanceBuilder()
// tab page closed -> refresh parent window
if (m_bIsNestedBuilder && m_sTypeOfJSON == "dialog")
{
- sendFullUpdate(true);
- flush();
+ jsdialog::SendFullUpdate(OUString::number(m_nWindowId), "__DIALOG__");
}
if (m_sTypeOfJSON == "popup")