commit 78780e7b389cfa4ee2e2e232600b94fda2ff542e
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Tue Jul 9 16:28:58 2013 +0200
Allow master view/update when current buffer is the master
diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp
index 2fa5ccf..d0a67ed 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 [<FORMAT>]
* \li Params: <FORMAT>: 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 [<FORMAT>]
* \li Params: <FORMAT>: 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 ffc7073..006c7e8 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;