]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inseterror.C
fix #832
[lyx.git] / src / insets / inseterror.C
index 858fcf6f15d802d36aed6012808f56f10affae19..1470506170a0bccc5086c5d3880bcd49fc0c1ef5 100644 (file)
@@ -26,7 +26,6 @@
 
 using std::ostream;
 
-/* Error, used for the LaTeX-Error Messages */
 
 InsetError::InsetError(string const & str, bool)
        : contents(str)
@@ -35,7 +34,7 @@ InsetError::InsetError(string const & str, bool)
 
 InsetError::~InsetError()
 {
-       Dialogs::hide()("error", this);
+       Dialogs::hide("error", this);
 }
 
 
@@ -44,15 +43,14 @@ dispatch_result InsetError::localDispatch(FuncRequest const & cmd)
        dispatch_result result = UNDISPATCHED;
 
        switch (cmd.action) {
-       case LFUN_MOUSE_RELEASE:
-               edit(cmd.view(), cmd.x, cmd.y, cmd.button());
-               break;
+       case LFUN_MOUSE_RELEASE: 
+       case LFUN_INSET_EDIT: 
+               cmd.view()->owner()->getDialogs().show("error", getContents(), this);
+               return DISPATCHED;
 
        default:
-               break;
+               return Inset::localDispatch(cmd);
        }
-
-       return result;
 }
 
 
@@ -81,7 +79,7 @@ int InsetError::width(BufferView *, LyXFont const & font) const
 
 
 void InsetError::draw(BufferView * bv, LyXFont const & font,
-                     int baseline, float & x, bool) const
+                     int baseline, float & x) const
 {
        lyx::Assert(bv);
        cache(bv);
@@ -111,15 +109,3 @@ string const InsetError::editMessage() const
 {
        return _("Opened error");
 }
-
-
-void InsetError::edit(BufferView * bv, int, int, mouse_button::state)
-{
-       bv->owner()->getDialogs().show("error", getContents(), this);
-}
-
-
-void InsetError::edit(BufferView * bv, bool)
-{
-       edit(bv, 0, 0, mouse_button::none);
-}