From: Scott Kostyshak Date: Wed, 19 Feb 2014 21:58:29 +0000 (-0500) Subject: Disable custom insets insert menu if read only X-Git-Tag: 2.2.0alpha1~1751 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0bf61a48c0077121dc07d5ac1cfc090213409cf0;p=lyx.git 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 7fa219b394..eaf9f24917 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!"))); }