]> 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>
Thu, 25 Apr 2024 15:22:22 +0000 (17:22 +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.

src/mathed/MathData.cpp

index 5f62d86846ab5247b70f3dac7b57dc8c331f9c0f..73c1d9db908bc9240dc08901dd60bbdff16f461f 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()