Fixed a bug when tabular was not redrawed.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2124 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2001-06-14 10:44:21 +00:00
parent 31b56dac80
commit 0ba8b80b15
3 changed files with 21 additions and 3 deletions

View File

@ -944,7 +944,12 @@ void BufferView::Pimpl::workAreaExpose()
void BufferView::Pimpl::update()
{
if (screen_.get()) screen_->Update(bv_->text, bv_);
if (screen_.get() &&
(!bv_->text->theLockingInset() ||
!bv_->text->theLockingInset()->nodraw()))
{
screen_->Update(bv_->text, bv_);
}
}
// Values used when calling update:

View File

@ -1,3 +1,9 @@
2001-06-13 Juergen Vigna <jug@sad.it>
* insettabular.C (nodraw): only go down the tree if we don't have
that flag set otherwise it's obvious that we don't want to draw.
(LocalDispatch): do also an update if we have an undispached result.
2001-06-19 Angus Leeming <a.leeming@ic.ac.uk>
* insetcite.C:

View File

@ -221,8 +221,11 @@ int InsetTabular::width(BufferView *, LyXFont const &) const
void InsetTabular::draw(BufferView * bv, LyXFont const & font, int baseline,
float & x, bool cleared) const
{
if (nodraw())
if (nodraw()) {
if (cleared)
need_update = FULL;
return;
}
#if 0
if (need_update == INIT) {
if (calculate_dimensions_of_cells(bv, font, true))
@ -1050,11 +1053,15 @@ InsetTabular::LocalDispatch(BufferView * bv,
break;
nodraw(true);
if (ActivateCellInset(bv)) {
// reset need_update setted in above function!
need_update = NONE;
result = the_locking_inset->LocalDispatch(bv, action, arg);
if ((result == UNDISPATCHED) || (result == FINISHED)) {
UnlockInsetInInset(bv, the_locking_inset);
nodraw(false);
the_locking_inset = 0;
// we need to update if this was requested before
UpdateLocal(bv, NONE, false);
return UNDISPATCHED;
}
nodraw(false);
@ -2324,7 +2331,7 @@ bool InsetTabular::isRightToLeft(BufferView *bv )
bool InsetTabular::nodraw() const
{
if (the_locking_inset)
if (!UpdatableInset::nodraw() && the_locking_inset)
return the_locking_inset->nodraw();
return UpdatableInset::nodraw();
}