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.
This commit is contained in:
Scott Kostyshak 2014-02-19 16:58:29 -05:00
parent d449e7e64e
commit 0bf61a48c0

View File

@ -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!")));
}