mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Fix comments
The FIXME is not needed, this is how StyleChanger and FracChanger work: In the constructor, they change the state of the FontInfo, and in the destructor the state is set back. Therefore, all code that needs the changed state, needs to be executed while the objects do still exist.
This commit is contained in:
parent
7cd2e55d1f
commit
90a524a075
@ -553,8 +553,8 @@ void InsetMathBinom::metrics(MetricsInfo & mi, Dimension & dim) const
|
|||||||
{
|
{
|
||||||
Dimension dim0, dim1;
|
Dimension dim0, dim1;
|
||||||
|
|
||||||
// FIXME: for an unknown reason the cells must be set directly
|
// The cells must be set while the RAII objects (StyleChanger,
|
||||||
// after the StyleChanger and cannot be set after the if case
|
// FracChanger) do still exist and cannot be set after the if case.
|
||||||
if (kind_ == DBINOM) {
|
if (kind_ == DBINOM) {
|
||||||
StyleChanger dummy(mi.base, LM_ST_DISPLAY);
|
StyleChanger dummy(mi.base, LM_ST_DISPLAY);
|
||||||
cell(0).metrics(mi, dim0);
|
cell(0).metrics(mi, dim0);
|
||||||
@ -587,8 +587,8 @@ void InsetMathBinom::draw(PainterInfo & pi, int x, int y) const
|
|||||||
kind_ == BRACK ? from_ascii("]") : from_ascii(")");
|
kind_ == BRACK ? from_ascii("]") : from_ascii(")");
|
||||||
|
|
||||||
int m = x + dim.width() / 2;
|
int m = x + dim.width() / 2;
|
||||||
// FIXME: for an unknown reason the cells must be drawn directly
|
// The cells must be drawn while the RAII objects (StyleChanger,
|
||||||
// after the StyleChanger and cannot be drawn after the if case
|
// FracChanger) do still exist and cannot be drawn after the if case.
|
||||||
if (kind_ == DBINOM) {
|
if (kind_ == DBINOM) {
|
||||||
StyleChanger dummy(pi.base, LM_ST_DISPLAY);
|
StyleChanger dummy(pi.base, LM_ST_DISPLAY);
|
||||||
cell(0).draw(pi, m - dim0.wid / 2, y - dim0.des - 3 - 5);
|
cell(0).draw(pi, m - dim0.wid / 2, y - dim0.des - 3 - 5);
|
||||||
|
Loading…
Reference in New Issue
Block a user