Fix bug #7444. We are only interested in whether the dimension has been stored in the cache. Therefore we have to use hasDim, otherwise we get a negative response just because the x-y is not set.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38403 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2011-04-15 10:54:52 +00:00
parent 24c7a688d3
commit b29ef9e1a5

View File

@ -261,7 +261,7 @@ void MathMacro::metrics(MetricsInfo & mi, Dimension & dim) const
// otherwise do a manual metrics call // otherwise do a manual metrics call
CoordCache & coords = mi.base.bv->coordCache(); CoordCache & coords = mi.base.bv->coordCache();
for (idx_type i = 0; i < nargs(); ++i) { for (idx_type i = 0; i < nargs(); ++i) {
if (!coords.getArrays().has(&cell(i))) { if (!coords.getArrays().hasDim(&cell(i))) {
Dimension tdim; Dimension tdim;
cell(i).metrics(mi, tdim); cell(i).metrics(mi, tdim);
} }