mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Fix Cursor::inCoordCache: the root inset is never in the cache
Fixes bug #10007.
This commit is contained in:
parent
bb6130eea1
commit
e8e97d67d9
@ -550,8 +550,11 @@ int Cursor::currentMode()
|
|||||||
|
|
||||||
bool Cursor::inCoordCache() const
|
bool Cursor::inCoordCache() const
|
||||||
{
|
{
|
||||||
|
// the root inset is not in cache, but we do not need it.
|
||||||
|
if (depth() == 1)
|
||||||
|
return true;
|
||||||
CoordCache::Insets const & icache = bv_->coordCache().getInsets();
|
CoordCache::Insets const & icache = bv_->coordCache().getInsets();
|
||||||
for (size_t i = 0 ; i < depth() ; ++i)
|
for (size_t i = 1 ; i < depth() ; ++i)
|
||||||
if (!icache.has(&(*this)[i].inset()))
|
if (!icache.has(&(*this)[i].inset()))
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user