From: Jürgen Vigna Date: Fri, 3 Nov 2000 15:56:33 +0000 (+0000) Subject: Some more cursor/redraw problems fixe (hopefully the last ones ;) X-Git-Tag: 1.6.10~21842 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a6b2d503fb44e780b2d20f506677fd452cac9811;p=features.git Some more cursor/redraw problems fixe (hopefully the last ones ;) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1194 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/ChangeLog b/ChangeLog index 451234e62c..67d0ede674 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2000-11-03 Juergen Vigna + + * src/insets/insettabular.h: added fixed number to update codes so + that update is only in one direction. + + * src/insets/insettabular.C (UpdateLocal): modified a bit don't think + it matters. + + * src/insets/insettext.C (InsetButtonPress): set the_locking_inset + before call to edit because of redraw. + + * src/insets/insetcollapsable.C (draw): fixed clearing too much. + 2000-11-03 Jean-Marc Lasgouttes * lib/ui/default.ui: Populate "edit_float" menu diff --git a/src/insets/insetcollapsable.C b/src/insets/insetcollapsable.C index 2870b5d3bd..ca8f71d31c 100644 --- a/src/insets/insetcollapsable.C +++ b/src/insets/insetcollapsable.C @@ -187,6 +187,8 @@ void InsetCollapsable::draw(BufferView * bv, LyXFont const & f, h = pain.paperHeight(); if ((top_x + w) > pain.paperWidth()) w = pain.paperWidth(); + if (baseline < 0) + h += (baseline - ascent(bv, f)); pain.fillRectangle(tx, ty - 1, w, h + 2); cleared = true; } diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index f4db822cf7..b16366a71e 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -444,7 +444,7 @@ void InsetTabular::Edit(BufferView * bv, int x, int y, unsigned int button) if (InsetHit(bv, x, y)) { ActivateCellInset(bv, x, y, button); } - UpdateLocal(bv, NONE, false); +// UpdateLocal(bv, NONE, false); // bv->getOwner()->getPopups().updateFormTabular(); } @@ -474,11 +474,14 @@ void InsetTabular::InsetUnlock(BufferView * bv) void InsetTabular::UpdateLocal(BufferView * bv, UpdateCodes what, bool mark_dirty) const { - need_update = what; + if (need_update < what) // only set this if it has greater update + need_update = what; // Dirty Cast! (Lgb) - bv->updateInset(const_cast(this), mark_dirty); - if (locked && (what != NONE)) - resetPos(bv); + if (need_update != NONE) { + bv->updateInset(const_cast(this), mark_dirty); + if (locked) // && (what != NONE)) + resetPos(bv); + } } diff --git a/src/insets/insettabular.h b/src/insets/insettabular.h index 39ee7b6bf6..4a62f37108 100644 --- a/src/insets/insettabular.h +++ b/src/insets/insettabular.h @@ -70,11 +70,11 @@ public: /// enum UpdateCodes { NONE = 0, - INIT, - FULL, - CELL, - CURSOR, - SELECTION + CURSOR = 1, + CELL = 2, + SELECTION = 3, + FULL = 4, + INIT = 5 }; /// InsetTabular(Buffer const &, int rows = 1, int columns = 1); diff --git a/src/insets/insettext.C b/src/insets/insettext.C index 9122719fe0..6f17fbac6f 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -608,6 +608,7 @@ void InsetText::InsetButtonPress(BufferView * bv, int x, int y, int button) the_locking_inset->InsetUnlock(bv); inset_x = cx(bv) - top_x + drawTextXOffset; inset_y = cy(bv) + drawTextYOffset; + the_locking_inset = static_cast(inset); inset->InsetButtonPress(bv, x - inset_x, y - inset_y, button); inset->Edit(bv, x - inset_x, y - inset_y, button); if (the_locking_inset) { @@ -626,6 +627,7 @@ void InsetText::InsetButtonPress(BufferView * bv, int x, int y, int button) inset_y = cy(bv) + drawTextYOffset; inset_pos = cpos(bv); inset_par = cpar(bv); + the_locking_inset = uinset; uinset->InsetButtonPress(bv, x - inset_x, y - inset_y, button); uinset->Edit(bv, x - inset_x, y - inset_y, 0); // TEXT(bv)->ClearSelection();