* LaTeX.C (run): Fix a bug where the DVI file was not updated due
to an old format .dep file.
+2003-03-07 Angus Leeming <leeming@lyx.org>
+
+ * text3.C (dispatch): remove the 'gross hack' of calling inset->edit
+ when the LFUN_MOUSE_RELEASE should have been handled by
+ inset->localDispatch.
+
2003-03-07 Angus Leeming <leeming@lyx.org>
* BufferView_pimpl.C (dispatch):
+2003-03-07 Angus Leeming <leeming@lyx.org>
+
+ * inseterror.C (localDispatch): new method; calls edit() on
+ LFUN_MOUSE_RELEASE.
+
2003-03-07 Angus Leeming <leeming@lyx.org>
* insetbibitem.C (localDispatch):
}
break;
+ case LFUN_MOUSE_RELEASE:
+ edit(cmd.view(), cmd.x, cmd.y, cmd.button());
+ break;
+
default:
break;
}
InsetCommandParams const & params() const { return p_; }
///
void setParams(InsetCommandParams const &);
- /// small wrapper for the time being
+ ///
virtual dispatch_result localDispatch(FuncRequest const & cmd);
private:
#include <config.h>
+#include "inseterror.h"
#include "BufferView.h"
-#include "frontends/font_metrics.h"
-#include "lyxfont.h"
+#include "funcrequest.h"
#include "gettext.h"
-#include "inseterror.h"
+#include "lyxfont.h"
+
+#include "frontends/Dialogs.h"
+#include "frontends/font_metrics.h"
#include "frontends/LyXView.h"
#include "frontends/Painter.h"
-#include "frontends/Dialogs.h"
+
#include "support/LAssert.h"
using std::ostream;
}
+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;
+
+ default:
+ break;
+ }
+
+ return result;
+}
+
+
int InsetError::ascent(BufferView *, LyXFont const & font) const
{
LyXFont efont;
///
~InsetError();
///
+ virtual dispatch_result localDispatch(FuncRequest const & cmd);
+ ///
int ascent(BufferView *, LyXFont const &) const;
///
int descent(BufferView *, LyXFont const &) const;
}
break;
+ case LFUN_MOUSE_RELEASE:
+ edit(cmd.view(), cmd.x, cmd.y, cmd.button());
+ break;
+
default:
break;
}
}
break;
+ case LFUN_MOUSE_RELEASE:
+ edit(cmd.view(), cmd.x, cmd.y, cmd.button());
+ break;
+
default:
result = DISPATCHED;
break;
}
break;
+ case LFUN_MOUSE_RELEASE:
+ edit(cmd.view(), cmd.x, cmd.y, cmd.button());
+ break;
+
default:
break;
}
result = DISPATCHED;
}
break;
+
default:
result = InsetCommand::localDispatch(cmd);
}
bv->owner()->message(inset_hit->editMessage());
- if (isHighlyEditableInset(inset_hit)) {
- // Highly editable inset, like math
- UpdatableInset * inset = (UpdatableInset *) inset_hit;
- FuncRequest cmd1(bv, LFUN_MOUSE_RELEASE, x, y, cmd.button());
- inset->localDispatch(cmd1);
- } else {
- FuncRequest cmd1(bv, LFUN_MOUSE_RELEASE, x, y, cmd.button());
- inset_hit->localDispatch(cmd1);
- // IMO this is a gross hack! Insets should be changed so that
- // they call the actions they have to do with the insetButtonRel.
- // function and not in the edit(). This should be changed
- // (Jug 20020329)
-#ifdef WITH_WARNINGS
-#warning Please remove donot call inset->edit() here (Jug 20020812)
-#endif
- inset_hit->edit(bv, x, y, cmd.button());
- }
- break;
+ FuncRequest cmd1(bv, LFUN_MOUSE_RELEASE, x, y, cmd.button());
+ inset_hit->localDispatch(cmd1);
}
break;