Fix bug #7330 (No error notification with 'View master document')

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37843 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2011-03-03 16:00:40 +00:00
parent b8cdbc7be8
commit 33d853d1aa

View File

@ -1425,9 +1425,20 @@ void GuiView::errors(string const & error_type, bool from_master)
if (!bv)
return;
#if EXPORT_in_THREAD && (QT_VERSION >= 0x040400)
// We are called with from_master == false by default, so we
// have to figure out whether that is the case or not.
ErrorList & el = bv->buffer().errorList(error_type);
if (el.empty()) {
el = bv->buffer().masterBuffer()->errorList(error_type);
from_master = true;
}
#else
ErrorList & el = from_master ?
bv->buffer().masterBuffer()->errorList(error_type) :
bv->buffer().errorList(error_type);
#endif
if (el.empty())
return;