From 0bf61a48c0077121dc07d5ac1cfc090213409cf0 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Wed, 19 Feb 2014 16:58:29 -0500 Subject: [PATCH] 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. --- src/frontends/qt4/Menus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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!"))); } -- 2.39.5