commit 0bf61a48c0077121dc07d5ac1cfc090213409cf0
Author: Scott Kostyshak <skost...@lyx.org>
Date:   Wed Feb 19 16:58:29 2014 -0500

    Disable custom insets insert menu if read only
    
    Before, if a document was read only and had no custom insets
    defined, the submenu would be enabled.

diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp
index 7fa219b..eaf9f24 100644
--- a/src/frontends/qt4/Menus.cpp
+++ b/src/frontends/qt4/Menus.cpp
@@ -1214,7 +1214,7 @@ void MenuDefinition::expandFlexInsert(
                }
        }
        // FIXME This is a little clunky.
-       if (items_.empty() && type == InsetLayout::CUSTOM)
+       if (items_.empty() && type == InsetLayout::CUSTOM && !buf->isReadonly())
                add(MenuItem(MenuItem::Help, qt_("No Custom Insets Defined!")));
 }
 

Reply via email to