]> git.lyx.org Git - features.git/blobdiff - src/MenuBackend.C
small fixes to menu backend
[features.git] / src / MenuBackend.C
index 356b550d60c4bb31fd0f9377a171a9c949d9d512..7c7cd00ffb484160181127762cc092d2a53bf98f 100644 (file)
@@ -314,6 +314,14 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const
                case MenuItem::ViewFormats:
                case MenuItem::UpdateFormats:
                case MenuItem::ExportFormats: {
+
+                       if (!buf && cit->kind() != MenuItem::ImportFormats) {
+                               tomenu.add(MenuItem(MenuItem::Command,
+                                                   _("No Documents Open!"),
+                                                   LFUN_NOACTION));
+                               continue;
+                       }                               
+                       
                        typedef vector<Format const *> Formats;
 
                        Formats formats;