From 0ba8b80b15d19a1dbd5da5b3b5c4d8b9af81937b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Vigna?= Date: Thu, 14 Jun 2001 10:44:21 +0000 Subject: [PATCH] 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 --- src/BufferView_pimpl.C | 7 ++++++- src/insets/ChangeLog | 6 ++++++ src/insets/insettabular.C | 11 +++++++++-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index 49aca6c6ab..841ead1254 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -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: diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 8dd173a2e1..84ba5cfa54 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,9 @@ +2001-06-13 Juergen Vigna + + * 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 * insetcite.C: diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index e2b8088fa1..e6711f0d36 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -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(); } -- 2.39.2