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