Skip to content
Snippets Groups Projects
Commit 9675f9f3 authored by Allen, Bruce (CIV)'s avatar Allen, Bruce (CIV)
Browse files

disable mp code view menu when corresponding view does not have focus

parent 8d7959ed
No related branches found
No related tags found
No related merge requests found
......@@ -383,8 +383,12 @@ class GUIManager(QObject):
# Note: we create all menu items fresh because we do not have
# hooks for updating built-in items such as "Copy".
self.edit_menu.clear()
self.edit_menu.addMenu(self.mp_code_view_1.mp_code_view_menu())
self.edit_menu.addMenu(self.mp_code_view_2.mp_code_view_menu())
menu1 = self.mp_code_view_1.mp_code_view_menu()
menu1.setEnabled(self.mp_code_view_1.hasFocus())
self.edit_menu.addMenu(menu1)
menu2 = self.mp_code_view_2.mp_code_view_menu()
menu2.setEnabled(self.mp_code_view_2.hasFocus())
self.edit_menu.addMenu(menu2)
def _fill_examples_menu(self):
if os.path.exists(examples_paths["models"]):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment