mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Fixed InsetText::getLyXText().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3303 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c99b2f4819
commit
a237be918f
@ -1,3 +1,8 @@
|
||||
2002-01-07 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* insettext.C (getLyXText): Fixed this function. An insert into the
|
||||
map is only done if we REALLY have a new BufferView.
|
||||
|
||||
2002-01-07 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* insettext.C: fix bug illustrated by attachment #37 of bug #59
|
||||
|
@ -2128,10 +2128,11 @@ LyXText * InsetText::getLyXText(BufferView const * lbv,
|
||||
Cache::iterator it = cache.find(bv);
|
||||
|
||||
if (it != cache.end()) {
|
||||
if (do_reinit)
|
||||
if (do_reinit) {
|
||||
reinitLyXText();
|
||||
else if (do_resize)
|
||||
} else if (do_resize) {
|
||||
resizeLyXText(do_resize);
|
||||
} else {
|
||||
if (lt || !it->second.remove) {
|
||||
lyx::Assert(it->second.text.get());
|
||||
cached_text = it->second.text;
|
||||
@ -2146,8 +2147,22 @@ LyXText * InsetText::getLyXText(BufferView const * lbv,
|
||||
sstate.lpar = 0;
|
||||
}
|
||||
}
|
||||
//
|
||||
// when we have to reinit the existing LyXText!
|
||||
//
|
||||
it->second.text->init(bv);
|
||||
restoreLyXTextState(bv, it->second.text.get());
|
||||
it->second.remove = false;
|
||||
}
|
||||
|
||||
cached_text = it->second.text;
|
||||
if (the_locking_inset && recursive) {
|
||||
return the_locking_inset->getLyXText(bv);
|
||||
}
|
||||
return cached_text.get();
|
||||
}
|
||||
///
|
||||
// we are here only if we don't have a BufferView * in the cache!!!
|
||||
///
|
||||
cached_text.reset(new LyXText(const_cast<InsetText *>(this)));
|
||||
cached_text->init(bv);
|
||||
restoreLyXTextState(bv, cached_text.get());
|
||||
|
Loading…
Reference in New Issue
Block a user