Commit: Fixed multi level list undo.


Subject: Commit: Fixed multi level list undo.
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Thu Nov 23 2000 - 19:40:04 CST


On Fri, 24 Nov 2000, Martin Sevior wrote:
>
> On the list backend I'd like us to be able to correctly undo a list
> nested arbitrarily deeply after being cut. Right now we only get the first
> two levels right, the third level thinks it's a child of the first level
> not the second. Make a list
>
> 1.
> 2.
> 3.
> 3.1
> 3.2
> 3.3
> 3.4
> 3.4.1
> 3.4.2
>
> cut from 2. to 3.4.2. Do an undo and you get:
>
> 1.
> 2.
> 3.
> 3.1
> 3.2
> 3.3
> 3.4
> 3.1
> 3.2
>
> This can be fixed in the ::findAndSetParentItem() method by searching
> ALL the lists in the document for the first previous sdh rather than just
> parent list. Of course we would also have to replace the parent pointer in
> the AutoNum if we found an sdh closer to the current list.

Committed.

        I couldn't help myself. It was too easy not to do. This is fixed
and committed. It would be good to come up with a more efficient way to do
this as outlined below.

Martin

hecking in src/af/gr/unix/gr_UnixGraphics.cpp;
/cvsroot/abi/src/af/gr/unix/gr_UnixGraphics.cpp,v <--
gr_UnixGraphics.cpp
new revision: 1.85; previous revision: 1.84
done
Checking in src/af/xap/xp/xap_App.cpp;
/cvsroot/abi/src/af/xap/xp/xap_App.cpp,v <-- xap_App.cpp
new revision: 1.53; previous revision: 1.52
done
Checking in src/text/fmt/xp/fl_AutoNum.cpp;
/cvsroot/abi/src/text/fmt/xp/fl_AutoNum.cpp,v <-- fl_AutoNum.cpp
new revision: 1.33; previous revision: 1.32
done
Checking in src/wp/ap/xp/ap_EditMethods.cpp;
/cvsroot/abi/src/wp/ap/xp/ap_EditMethods.cpp,v <-- ap_EditMethods.cpp
new revision: 1.250; previous revision: 1.249
done
Checking in src/wp/ap/xp/ap_Menu_LabelSet_no-BOK.h;
/cvsroot/abi/src/wp/ap/xp/ap_Menu_LabelSet_no-BOK.h,v <--
ap_Menu_LabelSet_no-BOK.h
new revision: 1.9; previous revision: 1.8
done
Checking in user/wp/strings/no-BOK.strings;
/cvsroot/abi/user/wp/strings/no-BOK.strings,v <-- no-BOK.strings
new revision: 1.13; previous revision: 1.12
done

> Once this is
> done it would probabally be worthwhile to invent a data structure to speed
> up these searches. Maybe a list of sdh's in document order and a binary
> search method to find the closest previous sdh?
>

Cheers

Martin



This archive was generated by hypermail 2b25 : Thu Nov 23 2000 - 19:41:23 CST