mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
Merge rev 16079:
Fix crash in brutefind2() when the inset was not in the coordcache. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@16831 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f6810b243f
commit
0e56b37311
@ -94,6 +94,8 @@ private:
|
|||||||
|
|
||||||
typedef std::map<T const *, Point> cache_type;
|
typedef std::map<T const *, Point> cache_type;
|
||||||
cache_type data_;
|
cache_type data_;
|
||||||
|
public:
|
||||||
|
cache_type const & getData() const { return data_; }
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
15
src/cursor.C
15
src/cursor.C
@ -98,7 +98,20 @@ namespace {
|
|||||||
int xo;
|
int xo;
|
||||||
int yo;
|
int yo;
|
||||||
InsetBase const * inset = &it.inset();
|
InsetBase const * inset = &it.inset();
|
||||||
Point o = theCoords.getInsets().xy(inset);
|
std::map<InsetBase const *, Point> const & data =
|
||||||
|
theCoords.getInsets().getData();
|
||||||
|
std::map<InsetBase const *, Point>::const_iterator I = data.find(inset);
|
||||||
|
|
||||||
|
// FIXME: in the case where the inset is not in the cache, this
|
||||||
|
// means that no part of it is visible on screen. In this case
|
||||||
|
// we don't do elaborate search and we just return the forwarded
|
||||||
|
// DocIterator at its beginning.
|
||||||
|
if (I == data.end()) {
|
||||||
|
it.top().pos() = 0;
|
||||||
|
return it;
|
||||||
|
}
|
||||||
|
|
||||||
|
Point o = I->second;
|
||||||
inset->cursorPos(it.top(), c.boundary(), xo, yo);
|
inset->cursorPos(it.top(), c.boundary(), xo, yo);
|
||||||
// Convert to absolute
|
// Convert to absolute
|
||||||
xo += o.x_;
|
xo += o.x_;
|
||||||
|
@ -211,6 +211,9 @@ What's new
|
|||||||
|
|
||||||
- Read filenames with spaces in external insets correctly from .lyx files
|
- Read filenames with spaces in external insets correctly from .lyx files
|
||||||
|
|
||||||
|
- Fix some crashes (with console error message "break on pointer: ...")
|
||||||
|
related to large insets.
|
||||||
|
|
||||||
* Build/installation:
|
* Build/installation:
|
||||||
|
|
||||||
- Allow autoconf 2.60 and 2.61 for building.
|
- Allow autoconf 2.60 and 2.61 for building.
|
||||||
|
Loading…
Reference in New Issue
Block a user