mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-22 16:37:28 +00:00
setViewCache: small helper function to hide messy details.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7253 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
485313c6d7
commit
46c55ef6b7
@ -1981,14 +1981,20 @@ RowList::iterator InsetText::crow(BufferView * bv) const
|
|||||||
LyXText * InsetText::getLyXText(BufferView const * bv,
|
LyXText * InsetText::getLyXText(BufferView const * bv,
|
||||||
bool const recursive) const
|
bool const recursive) const
|
||||||
{
|
{
|
||||||
if (bv)
|
setViewCache(bv);
|
||||||
text_.bv_owner = const_cast<BufferView *>(bv);
|
|
||||||
if (recursive && the_locking_inset)
|
if (recursive && the_locking_inset)
|
||||||
return the_locking_inset->getLyXText(bv, true);
|
return the_locking_inset->getLyXText(bv, true);
|
||||||
return &text_;
|
return &text_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void InsetText::setViewCache(BufferView const * bv) const
|
||||||
|
{
|
||||||
|
if (bv)
|
||||||
|
text_.bv_owner = const_cast<BufferView *>(bv);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetText::deleteLyXText(BufferView * bv, bool recursive) const
|
void InsetText::deleteLyXText(BufferView * bv, bool recursive) const
|
||||||
{
|
{
|
||||||
if (recursive) {
|
if (recursive) {
|
||||||
|
@ -165,6 +165,8 @@ public:
|
|||||||
LyXText * getLyXText(BufferView const *,
|
LyXText * getLyXText(BufferView const *,
|
||||||
bool const recursive = false) const;
|
bool const recursive = false) const;
|
||||||
///
|
///
|
||||||
|
void setViewCache(BufferView const * bv) const;
|
||||||
|
///
|
||||||
void deleteLyXText(BufferView *, bool recursive = true) const;
|
void deleteLyXText(BufferView *, bool recursive = true) const;
|
||||||
///
|
///
|
||||||
void resizeLyXText(BufferView *, bool force = false) const;
|
void resizeLyXText(BufferView *, bool force = false) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user