]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlBranch.C
small fix
[lyx.git] / src / frontends / controllers / ControlBranch.C
1 /**
2  * \file ControlBranch.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Angus Leeming
7  * \author Martin Vermeer
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #include <config.h>
13
14 #include "ControlBranch.h"
15 #include "funcrequest.h"
16 #include "insets/insetbranch.h"
17
18
19 using std::string;
20
21
22 ControlBranch::ControlBranch(Dialog & parent)
23         : Dialog::Controller(parent)
24 {}
25
26
27 bool ControlBranch::initialiseParams(string const & data)
28 {
29         InsetBranchParams params;
30         InsetBranchMailer::string2params(data, params);
31         params_.reset(new InsetBranchParams(params));
32
33         return true;
34 }
35
36
37 void ControlBranch::clearParams()
38 {
39         params_.reset();
40 }
41
42 void ControlBranch::dispatchParams()
43 {
44         string const lfun = InsetBranchMailer::params2string(string("branch"), params());
45         kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
46 }