[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri May 3 12:51:48 UTC 2019


 vcl/unx/gtk3/gtk3gtkinst.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 9342656e2fdff4d00fbe305f498aa0b6375f6c75
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri May 3 10:08:19 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri May 3 14:50:40 2019 +0200

    block/unblock notify events around TextView selection change
    
    Change-Id: I1075c0dea8e651536ffee5a12c6c12424f91de84
    Reviewed-on: https://gerrit.libreoffice.org/71730
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 7044b90c4bd5..b5ce2c75b4da 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -8016,6 +8016,7 @@ public:
 
     virtual void select_region(int nStartPos, int nEndPos) override
     {
+        disable_notify_events();
         GtkTextBuffer* pBuffer = gtk_text_view_get_buffer(m_pTextView);
         GtkTextIter start, end;
         gtk_text_buffer_get_iter_at_offset(pBuffer, &start, nStartPos);
@@ -8023,6 +8024,7 @@ public:
         gtk_text_buffer_select_range(pBuffer, &start, &end);
         GtkTextMark* mark = gtk_text_buffer_create_mark(pBuffer, "scroll", &end, true);
         gtk_text_view_scroll_mark_onscreen(m_pTextView, mark);
+        enable_notify_events();
     }
 
     virtual void set_editable(bool bEditable) override


More information about the Libreoffice-commits mailing list