Fix bug #7956: Assertion When Trying to Paste Into Table

For some unknown reason, the paste code likes to call Cursor::setSelection(), which is not appropriate here since we are not trying to set a selection at this point.
This commit is contained in:
Jean-Marc Lasgouttes 2012-06-01 12:34:51 +02:00
parent dffb1ab6c3
commit 18c887f2db
2 changed files with 2 additions and 3 deletions

View File

@ -1004,7 +1004,6 @@ void pasteFromStack(Cursor & cur, ErrorList & errorList, size_t sel_index)
cur.recordUndo();
pasteParagraphList(cur, theCuts[sel_index].first,
theCuts[sel_index].second, errorList);
cur.setSelection();
}
@ -1028,7 +1027,6 @@ void pasteClipboardText(Cursor & cur, ErrorList & errorList, bool asParagraphs)
cur.recordUndo();
pasteParagraphList(cur, buffer.paragraphs(),
buffer.params().documentClassPtr(), errorList);
cur.setSelection();
return;
}
}
@ -1043,7 +1041,6 @@ void pasteClipboardText(Cursor & cur, ErrorList & errorList, bool asParagraphs)
cur.text()->insertStringAsParagraphs(cur, text, cur.current_font);
else
cur.text()->insertStringAsLines(cur, text, cur.current_font);
cur.setSelection();
}

View File

@ -151,6 +151,8 @@ What's new
- Fixed an infinite loop when pasting '\\ ' into math (bug 8089).
- Fixed an assertion when trying to paste into a table (bug 7956).
- Fixed an infinite loop after removing the first paragraph of the
document if it had a non-zero depth (bug 7641).