]> git.lyx.org Git - features.git/commitdiff
Fixed a bug when tabular was not redrawed.
authorJürgen Vigna <jug@sad.it>
Thu, 14 Jun 2001 10:44:21 +0000 (10:44 +0000)
committerJürgen Vigna <jug@sad.it>
Thu, 14 Jun 2001 10:44:21 +0000 (10:44 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2124 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView_pimpl.C
src/insets/ChangeLog
src/insets/insettabular.C

index 49aca6c6ab76e0df0a8f8f61d96c2fd927bee97b..841ead1254822fbd59bfb9b29100927e9f69d770 100644 (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:
index 8dd173a2e16c88fec6cb7480c624101870b3604b..84ba5cfa542f395d90c5dd873f15a5d10c3df766 100644 (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:
index e2b8088fa17107ea434e8b72bfd76c4c4ee09074..e6711f0d3678b5196c1db9550814a8cf130cae38 100644 (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();
 }