]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlNote.C
fix crash due to invalidated iterator
[lyx.git] / src / frontends / controllers / ControlNote.C
index 4a50523e39e5c6a7e2f2f414109e244946bcd2c8..3d2bd460beeb8bc27f3b449b950ffaa9d6ba0556 100644 (file)
@@ -5,7 +5,7 @@
  *
  * \author Angus Leeming
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 #include "ControlNote.h"
 #include "funcrequest.h"
 #include "insets/insetnote.h"
-#include "debug.h"
+#include "gettext.h"
+
+
+using std::string;
+
+namespace lyx {
+namespace frontend {
 
 ControlNote::ControlNote(Dialog & parent)
        : Dialog::Controller(parent)
@@ -22,12 +28,10 @@ ControlNote::ControlNote(Dialog & parent)
 
 bool ControlNote::initialiseParams(string const & data)
 {
-    InsetNoteParams params;
+       InsetNoteParams params;
        InsetNoteMailer::string2params(data, params);
        params_.reset(new InsetNoteParams(params));
-       
        return true;
-
 }
 
 
@@ -36,9 +40,12 @@ void ControlNote::clearParams()
        params_.reset();
 }
 
+
 void ControlNote::dispatchParams()
 {
-       string const lfun = InsetNoteMailer::params2string(string("note"), params());
-       kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
+       string const lfun = InsetNoteMailer::params2string(params());
+       kernel().dispatch(FuncRequest(getLfun(), lfun));
 }
 
+} // namespace frontend
+} // namespace lyx