mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Fixed updating of non locked inset inside other insets if requested!
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3139 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
63ab8b3517
commit
8e88c36e20
@ -2,6 +2,7 @@
|
||||
|
||||
* insettext.C (updateInsetInInset): use lt variable to forbid
|
||||
changes of LyXText in an update call.
|
||||
(updateInsetInInset): fixed updating of non locked insets!
|
||||
|
||||
2001-12-01 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
|
@ -835,29 +835,45 @@ bool InsetText::unlockInsetInInset(BufferView * bv, UpdatableInset * inset,
|
||||
|
||||
bool InsetText::updateInsetInInset(BufferView * bv, Inset * inset)
|
||||
{
|
||||
if (!the_locking_inset)
|
||||
return false;
|
||||
if (the_locking_inset != inset) {
|
||||
getLyXText(bv)->updateInset(bv, the_locking_inset);
|
||||
setUpdateStatus(bv, CURSOR_PAR);
|
||||
return the_locking_inset->updateInsetInInset(bv, inset);
|
||||
}
|
||||
bool clear = false;
|
||||
if (!lt) {
|
||||
lt = getLyXText(bv);
|
||||
clear = true;
|
||||
}
|
||||
if (lt->updateInset(bv, inset)) {
|
||||
if (!the_locking_inset) {
|
||||
bool found = lt->updateInset(bv, inset);
|
||||
if (clear)
|
||||
lt = 0;
|
||||
updateLocal(bv, CURSOR_PAR, false);
|
||||
} else if (clear)
|
||||
lt = 0;
|
||||
if (cpar(bv) == inset_par && cpos(bv) == inset_pos) {
|
||||
inset_x = cx(bv) - top_x + drawTextXOffset;
|
||||
inset_y = cy(bv) + drawTextYOffset;
|
||||
if (found)
|
||||
setUpdateStatus(bv, NONE);
|
||||
return found;
|
||||
}
|
||||
return true;
|
||||
if (the_locking_inset != inset) {
|
||||
#if 0
|
||||
lt->updateInset(bv, the_locking_inset);
|
||||
setUpdateStatus(bv, CURSOR_PAR);
|
||||
#endif
|
||||
bool found = the_locking_inset->updateInsetInInset(bv, inset);
|
||||
if (clear)
|
||||
lt = 0;
|
||||
if (found)
|
||||
setUpdateStatus(bv, CURSOR_PAR);
|
||||
return found;
|
||||
}
|
||||
bool found = lt->updateInset(bv, inset);
|
||||
if (clear)
|
||||
lt = 0;
|
||||
if (found) {
|
||||
setUpdateStatus(bv, CURSOR_PAR);
|
||||
#if 0
|
||||
updateLocal(bv, CURSOR_PAR, false);
|
||||
#endif
|
||||
if (cpar(bv) == inset_par && cpos(bv) == inset_pos) {
|
||||
inset_x = cx(bv) - top_x + drawTextXOffset;
|
||||
inset_y = cy(bv) + drawTextYOffset;
|
||||
}
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user