summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-07-30 20:20:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-07-31 11:28:24 +0200
commit869ef9f2118158222032964a5b24ae7d760b84e9 (patch)
tree257a42c1d99771c1bbb7249cfc8d6f95563aca92 /vcl
parent824c0cb9b2c0d74c7eb76ce08169f7eae11e39d0 (diff)
tdf#135317 avoid reenterence
Change-Id: I79b6c1c2a2503c49a94f6c7ed74286f53ccebd44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99821 Tested-by: Jenkins Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index a6e6901c0604..658c09ab756d 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -12225,6 +12225,7 @@ private:
gulong m_nOutputSignalId;
gulong m_nInputSignalId;
bool m_bEmptyField;
+ bool m_bSyncingValue;
double m_dValueWhenEmpty;
bool signal_output()
@@ -12285,6 +12286,7 @@ public:
, m_nOutputSignalId(g_signal_connect(pButton, "output", G_CALLBACK(signalOutput), this))
, m_nInputSignalId(g_signal_connect(pButton, "input", G_CALLBACK(signalInput), this))
, m_bEmptyField(false)
+ , m_bSyncingValue(false)
, m_dValueWhenEmpty(0.0)
{
}
@@ -12359,9 +12361,14 @@ public:
{
if (!m_pFormatter)
return;
+ // tdf#135317 avoid reenterence
+ if (m_bSyncingValue)
+ return;
+ m_bSyncingValue = true;
disable_notify_events();
gtk_spin_button_set_value(m_pButton, m_pFormatter->GetValue());
enable_notify_events();
+ m_bSyncingValue = false;
}
virtual void sync_range_from_formatter() override