Fix bug 4317.

http://bugzilla.lyx.org/show_bug.cgi?id=4317

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@21437 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-11-05 13:54:57 +00:00
parent 306dcd3916
commit 2b310c8157
2 changed files with 10 additions and 7 deletions

View File

@ -1129,14 +1129,14 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
// true (on).
if (lyxrc.auto_region_delete && cur.selection()) {
pit_type const begpit = cur.selBegin().pit();
pit_type const endpit = cur.selEnd().pit();
cutSelection(cur, false, false);
// When change tracking is set to off, the metrics update
// mechanism correctly detects if a full update is needed or not.
// This detection fails when a selection spans multiple rows and
// change tracking is enabled because the paragraph metrics stays
// the same. In this case, we force the full update:
// (see http://bugzilla.lyx.org/show_bug.cgi?id=3992)
if (cur.buffer().params().trackChanges)
// When a selection spans multiple paragraphs, the metrics update
// mechanism sometimes fails to detect that a full update is
// needed. In this case, we force the full update:
// (see http://bugzilla.lyx.org/show_bug.cgi?id=4317)
if (isMainText(*cur.bv().buffer()) && begpit != endpit)
cur.updateFlags(Update::Force);
}

View File

@ -85,6 +85,9 @@ What's new
- Fix a crash when deleting a row or column of a math matrix while its
content is selected (bug 4323).
- Fix a crash when overwriting a selection that spans multiple paragraphs
(bug 4317).
- Fix updating of externally modified files on Windows (bug 3172).
- Repair wasy font such that it can also be used on Mac (bug 2326).