mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
Use Andr�'s prefered idiom here.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7908 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
360b55ea0f
commit
57c37d2760
@ -1,3 +1,7 @@
|
||||
2003-10-13 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* formula.C (editing_inset): pass a pointer rather than a reference.
|
||||
|
||||
2003-10-13 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* formula.C: remove #include "PreviewImage.h".
|
||||
|
@ -179,10 +179,11 @@ void InsetFormula::read(Buffer const &, LyXLex & lex)
|
||||
|
||||
namespace {
|
||||
|
||||
bool editing_inset(InsetFormula const & inset)
|
||||
bool editing_inset(InsetFormula const * inset)
|
||||
{
|
||||
return (mathcursor &&
|
||||
mathcursor->formula() == const_cast<InsetFormula *>(&inset));
|
||||
return mathcursor &&
|
||||
(const_cast<InsetFormulaBase const *>(mathcursor->formula()) ==
|
||||
inset);
|
||||
}
|
||||
|
||||
} // namespace anon
|
||||
@ -193,7 +194,7 @@ void InsetFormula::draw(PainterInfo & pi, int x, int y) const
|
||||
cache(pi.base.bv);
|
||||
|
||||
// The previews are drawn only when we're not editing the inset.
|
||||
bool const use_preview = (!editing_inset(*this) &&
|
||||
bool const use_preview = (!editing_inset(this) &&
|
||||
preview_->previewReady());
|
||||
|
||||
int const w = dim_.wid;
|
||||
@ -213,7 +214,7 @@ void InsetFormula::draw(PainterInfo & pi, int x, int y) const
|
||||
!= lcolor.getX11Name(LColor::background))
|
||||
p.pain.fillRectangle(x, y - a, w, h, LColor::mathbg);
|
||||
|
||||
if (editing_inset(*this)) {
|
||||
if (editing_inset(this)) {
|
||||
mathcursor->drawSelection(pi);
|
||||
//p.pain.rectangle(x, y - a, w, h, LColor::mathframe);
|
||||
}
|
||||
@ -256,7 +257,7 @@ bool InsetFormula::insetAllowed(InsetOld::Code code) const
|
||||
|
||||
void InsetFormula::metrics(MetricsInfo & m, Dimension & dim) const
|
||||
{
|
||||
bool const use_preview = (!editing_inset(*this) &&
|
||||
bool const use_preview = (!editing_inset(this) &&
|
||||
preview_->previewReady());
|
||||
|
||||
if (use_preview) {
|
||||
|
Loading…
Reference in New Issue
Block a user