summaryrefslogtreecommitdiff
path: root/vcl/jsdialog
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-01-19 08:39:15 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2021-01-21 06:51:13 +0100
commit30afe838d35471c3d3e8f90e997ea0f4c152c6ae (patch)
treebe630b1bf19e39e661d0d38d8b9aa2e8e60c921c /vcl/jsdialog
parent160d406d5abdabf36e57e2d72b35d9b3fec52cbd (diff)
jsdialog: set entry text without back notification
We don't want to disturb user while editing the text Change-Id: I8a8b9a688133d27fc2aeaee6178a773641f4a79f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109612 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'vcl/jsdialog')
-rw-r--r--vcl/jsdialog/executor.cxx4
-rw-r--r--vcl/jsdialog/jsdialogbuilder.cxx4
2 files changed, 5 insertions, 3 deletions
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 655104633410..1de6db627f96 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -166,12 +166,12 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& rWidget, StringMap& rDat
}
else if (sControlType == "edit")
{
- auto pEdit = dynamic_cast<weld::Entry*>(pWidget);
+ auto pEdit = dynamic_cast<JSEntry*>(pWidget);
if (pEdit)
{
if (sAction == "change")
{
- pEdit->set_text(rData["data"]);
+ pEdit->set_text_without_notify(rData["data"]);
LOKTrigger::trigger_changed(*pEdit);
return true;
}
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 38ef2a44e354..0c57aaf4fa44 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -750,7 +750,7 @@ JSLabel::JSLabel(JSDialogSender* pSender, FixedText* pLabel, SalInstanceBuilder*
void JSLabel::set_label(const OUString& rText)
{
SalInstanceLabel::set_label(rText);
- notifyDialogState();
+ sendUpdate(m_xWidget);
};
JSButton::JSButton(JSDialogSender* pSender, ::Button* pButton, SalInstanceBuilder* pBuilder,
@@ -771,6 +771,8 @@ void JSEntry::set_text(const OUString& rText)
notifyDialogState();
}
+void JSEntry::set_text_without_notify(const OUString& rText) { SalInstanceEntry::set_text(rText); }
+
JSListBox::JSListBox(JSDialogSender* pSender, ::ListBox* pListBox, SalInstanceBuilder* pBuilder,
bool bTakeOwnership)
: JSWidget<SalInstanceComboBoxWithoutEdit, ::ListBox>(pSender, pListBox, pBuilder,