mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 13:04:58 +00:00
update counters if secnumdepth has changed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9829 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e609bd9925
commit
c8babc2cbf
@ -1,8 +1,13 @@
|
|||||||
|
2005-04-11 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||||
|
|
||||||
|
* ControlDocument.C (dispatchParams): update the counters if
|
||||||
|
necessary.
|
||||||
|
|
||||||
2005-04-13 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
2005-04-13 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||||
|
|
||||||
* Dialog.[Ch] (checkStatus): new
|
* Dialog.[Ch] (checkStatus): new
|
||||||
|
|
||||||
2005-03-27 MArtin Vermeer <martin.vermeer@hut.fi>
|
2005-03-27 Martin Vermeer <martin.vermeer@hut.fi>
|
||||||
|
|
||||||
* ControlDocument.C (dispatch_bufferparams): fix bug 1843
|
* ControlDocument.C (dispatch_bufferparams): fix bug 1843
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
#include "BranchList.h"
|
#include "BranchList.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "bufferparams.h"
|
#include "bufferparams.h"
|
||||||
|
#include "BufferView.h"
|
||||||
|
#include "buffer_funcs.h"
|
||||||
#include "funcrequest.h"
|
#include "funcrequest.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "LColor.h"
|
#include "LColor.h"
|
||||||
@ -89,15 +91,23 @@ void ControlDocument::dispatchParams()
|
|||||||
textclass_type const old_class =
|
textclass_type const old_class =
|
||||||
kernel().buffer().params().textclass;
|
kernel().buffer().params().textclass;
|
||||||
textclass_type const new_class = bp_->textclass;
|
textclass_type const new_class = bp_->textclass;
|
||||||
|
|
||||||
if (new_class != old_class) {
|
if (new_class != old_class) {
|
||||||
string const name = textclasslist[new_class].name();
|
string const name = textclasslist[new_class].name();
|
||||||
kernel().dispatch(FuncRequest(LFUN_TEXTCLASS_APPLY, name));
|
kernel().dispatch(FuncRequest(LFUN_TEXTCLASS_APPLY, name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int const old_secnumdepth = kernel().buffer().params().secnumdepth;
|
||||||
|
int const new_secnumdepth = bp_->secnumdepth;
|
||||||
|
|
||||||
// Apply the BufferParams.
|
// Apply the BufferParams.
|
||||||
dispatch_bufferparams(kernel(), params(), LFUN_BUFFERPARAMS_APPLY);
|
dispatch_bufferparams(kernel(), params(), LFUN_BUFFERPARAMS_APPLY);
|
||||||
|
|
||||||
|
// redo the numbering if necessary
|
||||||
|
if (new_secnumdepth != old_secnumdepth) {
|
||||||
|
updateCounters(kernel().buffer());
|
||||||
|
kernel().bufferview()->update();
|
||||||
|
}
|
||||||
|
|
||||||
// Generate the colours requested by each new branch.
|
// Generate the colours requested by each new branch.
|
||||||
BranchList & branchlist = params().branchlist();
|
BranchList & branchlist = params().branchlist();
|
||||||
if (branchlist.empty())
|
if (branchlist.empty())
|
||||||
|
Loading…
Reference in New Issue
Block a user