* GuiView.cpp: Simplify.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34162 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2010-04-16 12:49:27 +00:00
parent 5a77a063c1
commit 6708d2da7e

View File

@ -1399,10 +1399,7 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
if (cmd.origin() == FuncRequest::TOC) {
GuiToc * toc = static_cast<GuiToc*>(findOrBuild("toc", false));
FuncStatus fs;
if (toc->getStatus(documentBufferView()->cursor(), cmd, fs))
flag = fs;
else
if (!toc || !toc->getStatus(documentBufferView()->cursor(), cmd, flag))
flag.setEnabled(false);
return true;
}