From 78780e7b389cfa4ee2e2e232600b94fda2ff542e Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 9 Jul 2013 16:28:58 +0200 Subject: [PATCH] Allow master view/update when current buffer is the master --- src/LyXAction.cpp | 8 ++++---- src/frontends/qt4/GuiView.cpp | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index 2fa5ccf5f5..d0a67ed8eb 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -3252,8 +3252,8 @@ void LyXAction::init() { LFUN_BUFFER_PREVIOUS, "buffer-previous", ReadOnly, Buffer }, /*! * \var lyx::FuncCode lyx::LFUN_MASTER_BUFFER_UPDATE - * \li Action: When run from a child document, this updates (exports) document built - from the master buffer, if available. + * \li Action: Update (export) the document built from the master buffer, + if the current buffer is part of a master/child document. * \li Syntax: master-buffer-update [] * \li Params: : The format to display, where this is one of the formats defined (in the current GUI) in the @@ -3266,8 +3266,8 @@ void LyXAction::init() { LFUN_MASTER_BUFFER_UPDATE, "master-buffer-update", ReadOnly, Buffer }, /*! * \var lyx::FuncCode lyx::LFUN_MASTER_BUFFER_VIEW - * \li Action: When run from a child document, this command shows a preview built - from the master buffer, if available. + * \li Action: Show a preview built from the master buffer, if available. + if the current buffer is part of a master/child document. * \li Syntax: master-buffer-view [] * \li Params: : The format to display, where this is one of the formats defined (in the current GUI) in the diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index ffc7073937..006c7e847c 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -1611,7 +1611,9 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag) case LFUN_MASTER_BUFFER_UPDATE: case LFUN_MASTER_BUFFER_VIEW: - enable = doc_buffer && doc_buffer->parent() != 0 + enable = doc_buffer + && (doc_buffer->parent() != 0 + || doc_buffer->hasChildren()) && !d.processing_thread_watcher_.isRunning(); break; -- 2.39.5