- if (switchcap)
- addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(cmitem),
- FuncRequest(LFUN_INSET_MODIFY,
- from_ascii("changetype ")
- + type), QString(), true));
- else
- captions.addWithStatusCheck(MenuItem(MenuItem::Command,
- toqstr(trtype),
- FuncRequest(LFUN_CAPTION_INSERT,
- type), QString(), true));
+ // make menu item optional, otherwise we would also see
+ // forbidden caption types
+ if (switchcap)
+ addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(cmitem),
+ FuncRequest(LFUN_INSET_MODIFY,
+ from_ascii("changetype ")
+ + type), QString(), true));
+ else
+ captions.addWithStatusCheck(MenuItem(MenuItem::Command,
+ toqstr(trtype),
+ FuncRequest(LFUN_CAPTION_INSERT,
+ type), QString(), true));