Set buffer when creating a MathData from parts of another one

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.
This commit is contained in:
Jean-Marc Lasgouttes 2024-04-25 17:13:15 +02:00
parent b45a957929
commit ed2f3cb9cf

View 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()