mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
Make paste in ensuremath work as in simple math hulls
The ensuremath math inset derives from InsetMathNest, so that only the first cell of a grid gets pasted. This patch makes it a fixed 1x1 grid inset so that pasting works as in normal simple math hulls, i.e., all cells are pasted, one after the other. Fixes #11617.
This commit is contained in:
parent
c13d16704c
commit
d85710d32e
@ -26,7 +26,7 @@
|
||||
namespace lyx {
|
||||
|
||||
InsetMathEnsureMath::InsetMathEnsureMath(Buffer * buf)
|
||||
: InsetMathNest(buf, 1)
|
||||
: InsetMathGrid(buf, 1, 1)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -13,14 +13,14 @@
|
||||
#ifndef MATH_ENSUREMATHINSET_H
|
||||
#define MATH_ENSUREMATHINSET_H
|
||||
|
||||
#include "InsetMathNest.h"
|
||||
#include "InsetMathGrid.h"
|
||||
|
||||
|
||||
namespace lyx {
|
||||
|
||||
|
||||
/// Inset for ensuring math mode
|
||||
class InsetMathEnsureMath : public InsetMathNest {
|
||||
class InsetMathEnsureMath : public InsetMathGrid {
|
||||
public:
|
||||
explicit InsetMathEnsureMath(Buffer * buf);
|
||||
///
|
||||
@ -34,6 +34,23 @@ public:
|
||||
///
|
||||
void drawT(TextPainter & pi, int x, int y) const override;
|
||||
///
|
||||
void addRow(row_type row) override {}
|
||||
///
|
||||
void delRow(row_type row) override {}
|
||||
///
|
||||
void swapRow(row_type row) override {}
|
||||
///
|
||||
void addCol(col_type col) override {}
|
||||
///
|
||||
void delCol(col_type col) override {}
|
||||
///
|
||||
docstring eolString(row_type row, bool fragile, bool latex,
|
||||
bool last_eoln) const override
|
||||
{ return docstring(); }
|
||||
///
|
||||
docstring eocString(col_type col, col_type lastcol) const override
|
||||
{ return docstring(); }
|
||||
///
|
||||
void write(TeXMathStream & os) const override;
|
||||
///
|
||||
void mathmlize(MathMLStream &) const override;
|
||||
|
Loading…
Reference in New Issue
Block a user