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.

(cherry picked from commit ed2f3cb9cf)
This commit is contained in:
Jean-Marc Lasgouttes 2024-04-25 17:13:15 +02:00
parent 76188dcdf1
commit 2699a58cd7
2 changed files with 5 additions and 1 deletions

View File

@ -49,7 +49,9 @@ namespace lyx {
MathData::MathData(Buffer * buf, const_iterator from, const_iterator to) MathData::MathData(Buffer * buf, const_iterator from, const_iterator to)
: base_type(from, to), buffer_(buf) : base_type(from, to), buffer_(buf)
{} {
setContentsBuffer();
}
void MathData::setContentsBuffer() void MathData::setContentsBuffer()

View File

@ -90,6 +90,8 @@ What's new
- Fix initialization of an internal value. - Fix initialization of an internal value.
- Fix "Unassigned buffer_" error with math references (bug 12947).
* DOCUMENTATION AND LOCALIZATION * DOCUMENTATION AND LOCALIZATION