#ifdef Q_WS_MACX
#include "kbmap.h"
#include "QLyXKeySym.h"
-extern boost::scoped_ptr<kb_keymap> toplevel_keymap;
#endif
using std::make_pair;
if (name_.empty())
return;
+ // Here, We make sure that theLyXFunc points to the correct LyXView.
+ theLyXFunc().setLyXView(owner_->view());
+
Menu const & fromLyxMenu = owner_->backend().getMenu(name_);
owner_->backend().expand(fromLyxMenu, topLevelMenu_, owner_->view()->buffer());