From a079d95038a7ce4bed26aa27ba3bb9fee0164080 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Mon, 28 Feb 2011 03:39:43 +0000 Subject: [PATCH] Initializing the gui_ member of the cloned buffer has strange side effects with Qt/X11 (obscure X errors). Better avoiding it. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37797 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Buffer.cpp | 3 --- src/frontends/qt4/GuiView.cpp | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 1e7f06f5af..ce174381f7 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -342,7 +342,6 @@ Buffer::Impl::Impl(Buffer * owner, FileName const & file, bool readonly_, temppath = cloned_buffer_->d->temppath; file_fully_loaded = true; params = cloned_buffer_->d->params; - gui_ = cloned_buffer->d->gui_; bibfiles_cache_ = cloned_buffer_->d->bibfiles_cache_; bibinfo_ = cloned_buffer_->d->bibinfo_; bibinfo_cache_valid_ = cloned_buffer_->d->bibinfo_cache_valid_; @@ -3558,7 +3557,6 @@ bool Buffer::doExport(string const & format, bool put_in_tempdir, if (d->cloned_buffer_) { d->cloned_buffer_->d->errorLists["Export"] = d->errorLists["Export"]; - errors("Export"); } return false; } @@ -3573,7 +3571,6 @@ bool Buffer::doExport(string const & format, bool put_in_tempdir, if (d->cloned_buffer_) { d->cloned_buffer_->d->errorLists["Export"] = d->errorLists["Export"]; - errors("Export"); } return false; } diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index a5ea4577f7..9c7b97ef8a 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -530,6 +530,11 @@ void GuiView::processingThreadFinished(bool show_errors) message(watcher->result()); updateToolbars(); if (show_errors) { + BufferView const * const bv = currentBufferView(); + if (bv && !bv->buffer().errorList("Export").empty()) { + errors("Export"); + return; + } errors(d.last_export_format); } }