]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlBranch.C
fix crash due to invalidated iterator
[lyx.git] / src / frontends / controllers / ControlBranch.C
index 10f9811a36eca2f007a961d250c6dede65c2506c..1b656b542ccf19723befcdce985e5348fd5edece 100644 (file)
 #include <config.h>
 
 #include "ControlBranch.h"
+
+#include "buffer.h"
+#include "bufferparams.h"
+#include "BranchList.h"
 #include "funcrequest.h"
 #include "insets/insetbranch.h"
 
 
 using std::string;
+using std::vector;
 
+namespace lyx {
+namespace frontend {
 
 ControlBranch::ControlBranch(Dialog & parent)
        : Dialog::Controller(parent)
@@ -42,5 +49,14 @@ void ControlBranch::clearParams()
 void ControlBranch::dispatchParams()
 {
        string const lfun = InsetBranchMailer::params2string(params());
-       kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
+       kernel().dispatch(FuncRequest(getLfun(), lfun));
+}
+
+
+BranchList const & ControlBranch::branchlist() const
+{
+       return kernel().buffer().params().branchlist();
 }
+
+} // namespace frontend
+} // namespace lyx