mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
bug 2060: Clicking on a macro in a math inset crashes LyX
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13235 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
33381332fc
commit
7bb1fa55ac
@ -1,3 +1,7 @@
|
|||||||
|
2006-02-13 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||||
|
|
||||||
|
* math_macro.C (editXY): Prevent crash (fix by Andrew Beck)
|
||||||
|
|
||||||
2006-01-28 Lars Gullik Bjønnes <larsbj@lyx.org>
|
2006-01-28 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||||
|
|
||||||
* math_hullinset.C (getStatus): get rid of a compiler warning
|
* math_hullinset.C (getStatus): get rid of a compiler warning
|
||||||
|
@ -129,8 +129,17 @@ void MathMacro::validate(LaTeXFeatures & features) const
|
|||||||
InsetBase * MathMacro::editXY(LCursor & cur, int x, int y)
|
InsetBase * MathMacro::editXY(LCursor & cur, int x, int y)
|
||||||
{
|
{
|
||||||
// We may have 0 arguments, but MathNestInset requires at least one.
|
// We may have 0 arguments, but MathNestInset requires at least one.
|
||||||
if (nargs() > 0)
|
if (nargs() > 0) {
|
||||||
|
// Prevent crash due to cold coordcache
|
||||||
|
// FIXME: This is only a workaround, the call of
|
||||||
|
// MathNestInset::editXY is correct. The correct fix would
|
||||||
|
// ensure that the coordcache of the arguments is valid.
|
||||||
|
if (!editing(&cur.bv())) {
|
||||||
|
edit(cur, true);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
return MathNestInset::editXY(cur, x, y);
|
return MathNestInset::editXY(cur, x, y);
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user