From a33189175a733a9f35e30084cf4d54eefca5905b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Vigna?= Date: Thu, 25 Jul 2002 11:39:38 +0000 Subject: [PATCH] Performance patches for tabulars from Edwin and John. Removed some code which was there only for debugging purpose from undo_funcs.C. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4782 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 4 ++++ src/frontends/xforms/ChangeLog | 5 +++++ src/frontends/xforms/XWorkArea.C | 3 +++ src/insets/ChangeLog | 5 +++++ src/insets/insettabular.C | 7 ++++--- src/undo_funcs.C | 6 ------ 6 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b82b0eaba8..977da970f3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2002-07-25 Juergen Vigna + + * undo_funcs.C (createUndo): remove debugging code. + 2002-07-25 Dekel Tsur * buffer.C (parseSingleLyXformat2Token): Use default placement diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index a0f552da23..a057748857 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2002-07-25 Juergen Vigna + + * XWorkArea.C (work_area_handler): set y_old and x_old to some + values in the MOUSE or DRAG even. + 2002-07-25 John Levon * forms/form_float.fd: "Span columns" diff --git a/src/frontends/xforms/XWorkArea.C b/src/frontends/xforms/XWorkArea.C index b11948732f..1cfa29318e 100644 --- a/src/frontends/xforms/XWorkArea.C +++ b/src/frontends/xforms/XWorkArea.C @@ -372,6 +372,9 @@ int XWorkArea::work_area_handler(FL_OBJECT * ob, int event, ev->xmotion.y != y_old || fl_get_scrollbar_value(area->scrollbar) != scrollbar_value_old ) { + x_old = ev->xmotion.x; + y_old = ev->xmotion.y; + scrollbar_value_old = fl_get_scrollbar_value(area->scrollbar); lyxerr[Debug::WORKAREA] << "Workarea event: MOUSE" << endl; area->workAreaMotionNotify(ev->xmotion.x - ob->x, ev->xmotion.y - ob->y, diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 693646dd31..14cce5fbd2 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2002-07-25 Juergen Vigna + + * insettabular.C (insetMotionNotify): Don't update the screen + if we didn't do nothing. + 2002-07-25 Dekel Tsur * insetfloat.C (read, write): Allow default placement diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index e2b8bcfb50..5b1f628f16 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -862,15 +862,16 @@ void InsetTabular::insetMotionNotify(BufferView * bv, int x, int y, mouse_button } hideInsetCursor(bv); -// int const old_cell = actcell; + int const old_cell = actcell; setPos(bv, x, y); if (!hasSelection()) { setSelection(actcell, actcell); - } else { + updateLocal(bv, SELECTION, false); + } else if (old_cell != actcell) { setSelection(sel_cell_start, actcell); + updateLocal(bv, SELECTION, false); } - updateLocal(bv, SELECTION, false); showInsetCursor(bv); } diff --git a/src/undo_funcs.C b/src/undo_funcs.C index 49ad788a2c..a638d72ea2 100644 --- a/src/undo_funcs.C +++ b/src/undo_funcs.C @@ -324,13 +324,7 @@ bool createUndo(BufferView * bv, Undo::undo_kind kind, while (tmppar != end && tmppar->next()) { tmppar = tmppar->next(); -// FIXME: what does this #if 0 mean ? -#if 0 tmppar2->next(new Paragraph(*tmppar, true)); -#else - Paragraph * ptmp = new Paragraph(*tmppar, true); - tmppar2->next(ptmp); -#endif // a memory optimization: Just store the layout // information when only edit if (kind == Undo::EDIT) { -- 2.39.5