mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
remove depth wraparound
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5244 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5a15177281
commit
7f8a767e42
@ -1,3 +1,7 @@
|
||||
2002-09-09 John Levon <levon@movementarian.org>
|
||||
|
||||
* text2.C: remove confusing and awkward depth wraparound
|
||||
|
||||
2002-09-09 John Levon <levon@movementarian.org>
|
||||
|
||||
* BufferView_pimpl.C: Don't use empty arg for LFUN_CHILD_INSERT
|
||||
|
13
src/text2.C
13
src/text2.C
@ -546,8 +546,6 @@ void LyXText::incDepth(BufferView * bview)
|
||||
// and sel_end cursor
|
||||
cursor = selection.start;
|
||||
|
||||
bool anything_changed = false;
|
||||
|
||||
while (true) {
|
||||
// NOTE: you can't change the depth of a bibliography entry
|
||||
if (cursor.par()->layout()->labeltype != LABEL_BIBLIO) {
|
||||
@ -557,7 +555,6 @@ void LyXText::incDepth(BufferView * bview)
|
||||
if (cursor.par()->getDepth()
|
||||
< prev->getMaxDepthAfter()) {
|
||||
cursor.par()->params().depth(cursor.par()->getDepth() + 1);
|
||||
anything_changed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -566,16 +563,6 @@ void LyXText::incDepth(BufferView * bview)
|
||||
cursor.par(cursor.par()->next());
|
||||
}
|
||||
|
||||
// if nothing changed set all depth to 0
|
||||
if (!anything_changed) {
|
||||
cursor = selection.start;
|
||||
while (cursor.par() != selection.end.par()) {
|
||||
cursor.par()->params().depth(0);
|
||||
cursor.par(cursor.par()->next());
|
||||
}
|
||||
cursor.par()->params().depth(0);
|
||||
}
|
||||
|
||||
redoParagraphs(bview, selection.start, endpar);
|
||||
|
||||
// we have to reset the selection, because the
|
||||
|
Loading…
Reference in New Issue
Block a user