]> git.lyx.org Git - features.git/commitdiff
Allow master view/update when current buffer is the master
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 9 Jul 2013 14:28:58 +0000 (16:28 +0200)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 1 Sep 2013 18:14:44 +0000 (20:14 +0200)
src/LyXAction.cpp
src/frontends/qt4/GuiView.cpp

index 2fa5ccf5f5b369424f766a14a7dcff1a0353d1a2..d0a67ed8eb4c96dc417fd76837eb5d8e6d940783 100644 (file)
@@ -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
index ffc7073937824cb840fd96c81f41c6e36d33a322..006c7e847c024581cff757679fdd96c3edd1ddc1 100644 (file)
@@ -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;