robustify splice a bit

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6915 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2003-05-01 23:05:01 +00:00
parent 7a012d8134
commit 96885e74d7
2 changed files with 8 additions and 0 deletions

View File

@ -1,6 +1,11 @@
2003-05-02 Lars Gullik Bjønnes <larsbj@gullik.net>
* ParagraphList.C (splice): just return if pl is empty.
2003-05-02 Lars Gullik Bjønnes <larsbj@gullik.net>
* ParagraphList.C (splice): new function.
* CutAndPaste.C (pasteSelection): use it
2003-05-01 Lars Gullik Bjønnes <larsbj@gullik.net>

View File

@ -178,6 +178,9 @@ void ParagraphList::assign(iterator beg, iterator end)
void ParagraphList::splice(iterator pos, ParagraphList & pl)
{
if (pl.parlist == 0)
return;
Paragraph * first = pl.parlist;
Paragraph * last = first;
#ifndef NO_NEXT