* LyXFunc::getStatus(): make it work in non-gui mode.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16065 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2006-11-26 15:46:02 +00:00
parent 6994ba59c0
commit 4bf43a35ac

View File

@ -376,11 +376,9 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
Note that this code is not perfect, as bug 1941 attests:
http://bugzilla.lyx.org/show_bug.cgi?id=1941#c4
*/
Buffer * buf;
if (cmd.origin == FuncRequest::MENU && !lyx_view_->hasFocus())
Buffer * buf = lyx_view_? lyx_view_->buffer() : 0;
if (lyx_view_ && cmd.origin == FuncRequest::MENU && !lyx_view_->hasFocus())
buf = 0;
else
buf = lyx_view_->buffer();
if (cmd.action == LFUN_NOACTION) {
flag.message(from_utf8(N_("Nothing to do")));