Fix bug #6556: Exporting .lyx to .lyx15 or lyx16 report error, yet succeeds.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33557 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2010-02-24 17:02:52 +00:00
parent a15a58b51c
commit ccf2080ae8
2 changed files with 3 additions and 2 deletions

View File

@ -1891,9 +1891,10 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr)
setReadonly(!isReadonly());
break;
//FIXME: This is now handled in GuiView
case LFUN_BUFFER_EXPORT: {
bool success = doExport(argument, false, false);
dr.setError(success);
dr.setError(!success);
if (!success)
dr.setMessage(bformat(_("Error exporting to format: %1$s."),
func.argument()));

View File

@ -2775,7 +2775,7 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
dr);
break;
}
if (doc_buffer->doExport(argument, false)) {
if (!doc_buffer->doExport(argument, false)) {
dr.setError(true);
dr.setMessage(bformat(_("Error exporting to format: %1$s."),
cmd.argument()));