changeset 27258:922c47ff5218

disable editor actions in window menu when editor is not available (bug #56114) * main-window.cc (construct_window_menu_item): disable action if related widget is not present
author Torsten Lilge <ttl-octave@mailbox.org>
date Wed, 17 Jul 2019 21:52:46 +0200
parents 24ed9cefc86e
children a42821748671
files libgui/src/main-window.cc
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/main-window.cc	Tue Jul 16 19:18:28 2019 +0200
+++ b/libgui/src/main-window.cc	Wed Jul 17 21:52:46 2019 +0200
@@ -2466,6 +2466,10 @@
             connect (action, SIGNAL (triggered (void)), widget, SLOT (focus (void)));
           }
       }
+    else
+      {
+        action->setEnabled (false);
+      }
 
     return action;
   }