[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Fri Feb 5 08:15:45 UTC 2021
vcl/jsdialog/jsdialogbuilder.cxx | 12 ++++++++++++
1 file changed, 12 insertions(+)
New commits:
commit 7b1bb4335c995757ff3b74584f6e9fda24bb0b67
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Jan 20 17:48:18 2021 +0100
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Fri Feb 5 09:15:08 2021 +0100
jsdialog: don't send multiple updates with the same content
Change-Id: I601511a85386a8a35cbc6a121a4719928f585794
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109726
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109957
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 55fdb2bd995d..4d4802138fcf 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -64,6 +64,18 @@ void JSDialogNotifyIdle::send(const boost::property_tree::ptree& rTree)
void JSDialogNotifyIdle::sendMessage(jsdialog::MessageType eType, VclPtr<vcl::Window> pWindow)
{
+ // we want only the latest update of same type
+ // TODO: also if we met full update - previous updates are not valid
+ auto it = m_aMessageQueue.begin();
+
+ while (it != m_aMessageQueue.end())
+ {
+ if (it->first == eType && it->second == pWindow)
+ it = m_aMessageQueue.erase(it);
+ else
+ it++;
+ }
+
m_aMessageQueue.push_back(std::make_pair(eType, pWindow));
}
More information about the Libreoffice-commits
mailing list