]> git.lyx.org Git - features.git/commitdiff
Performance patches for tabulars from Edwin and John. Removed some
authorJürgen Vigna <jug@sad.it>
Thu, 25 Jul 2002 11:39:38 +0000 (11:39 +0000)
committerJürgen Vigna <jug@sad.it>
Thu, 25 Jul 2002 11:39:38 +0000 (11:39 +0000)
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
src/frontends/xforms/ChangeLog
src/frontends/xforms/XWorkArea.C
src/insets/ChangeLog
src/insets/insettabular.C
src/undo_funcs.C

index b82b0eaba8fbd4c1fbf84c95de266fe01ac60869..977da970f3bbed63b6d691da12cf2855f0074a8c 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-25  Juergen Vigna  <jug@sad.it>
+
+       * undo_funcs.C (createUndo): remove debugging code.
+
 2002-07-25  Dekel Tsur  <dekelts@tau.ac.il>
 
        * buffer.C (parseSingleLyXformat2Token): Use default placement
index a0f552da238d1f84b575e2c687b6fefa41e3d22b..a057748857d868ca8c66ebe972f190913b114497 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-25  Juergen Vigna  <jug@sad.it>
+
+       * 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  <levon@movementarian.org>
 
        * forms/form_float.fd: "Span columns"
index b11948732f8ac73433bea783fdabc004b5d63b08..1cfa29318e14d535bbb1ca2a03733a7a13daa21f 100644 (file)
@@ -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,
index 693646dd315cc88d72d5a9533d8a0e971e2137c2..14cce5fbd245f6a1221913a73d01c109357f7d5f 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-25  Juergen Vigna  <jug@sad.it>
+
+       * insettabular.C (insetMotionNotify): Don't update the screen
+       if we didn't do nothing.
+
 2002-07-25  Dekel Tsur  <dekelts@tau.ac.il>
 
        * insetfloat.C (read, write): Allow default placement
index e2b8bcfb504e56f6ff5999684395522d5630b3ed..5b1f628f165bd1c28fd25d47e95a98ca4a4321b9 100644 (file)
@@ -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);
 }
 
index 49ad788a2cd744677387bf6da31d9450e5277208..a638d72ea2617cdb201aa246a032a302ca991c92 100644 (file)
@@ -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) {