]> git.lyx.org Git - lyx.git/commitdiff
Set buffer when creating a MathData from parts of another one
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 25 Apr 2024 15:13:15 +0000 (17:13 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 1 Jun 2024 16:45:43 +0000 (18:45 +0200)
This is triggered by selecting part of an equation under Xcb platform
(x11). Indeed, the current selection has to be sent to the X11 server
and BufferView::requestSelection() is called. Eventually
cap::grabSelection() is the function that creates this partial
MathData object.

Fixes ticket #12947.

(cherry picked from commit ed2f3cb9cfa1e871d48a92d41791a77bd218ab67)

src/mathed/MathData.cpp
status.24x

index 4c3393482885db3126bc76598eb1403a45a2bd76..38f44a696ebfc30bd05b3dc25da2405bfdbb6d80 100644 (file)
@@ -49,7 +49,9 @@ namespace lyx {
 
 MathData::MathData(Buffer * buf, const_iterator from, const_iterator to)
        : base_type(from, to), buffer_(buf)
-{}
+{
+       setContentsBuffer();
+}
 
 
 void MathData::setContentsBuffer()
index 0328af480bc39c1b7a9ec110d0834112f602ad6d..e7f677295e4268a3002982372e477f381466cdd4 100644 (file)
@@ -90,6 +90,8 @@ What's new
 
 - Fix initialization of an internal value.
 
+- Fix "Unassigned buffer_" error with math references (bug 12947).
+
 
 * DOCUMENTATION AND LOCALIZATION