Skip to content

Commit d442b6d

Browse files
author
Sebastian Koslowski
committedDec 30, 2015
grc: fix 'Parser errors' menu item
1 parent dec480a commit d442b6d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎grc/gui/ActionHandler.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,6 @@ def _handle_action(self, action, *args):
115115
# Initialize/Quit
116116
##################################################
117117
if action == Actions.APPLICATION_INITIALIZE:
118-
if ParseXML.xml_failures:
119-
Messages.send_xml_errors_if_any(ParseXML.xml_failures)
120-
Actions.XML_PARSER_ERRORS_DISPLAY.set_sensitive(True)
121-
122118
if not self.init_file_paths:
123119
self.init_file_paths = filter(os.path.exists, Preferences.get_open_files())
124120
if not self.init_file_paths: self.init_file_paths = ['']
@@ -131,7 +127,8 @@ def _handle_action(self, action, *args):
131127
self.main_window.btwin.search_entry.hide()
132128

133129
# Disable all actions, then re-enable a few
134-
for action in Actions.get_all_actions(): action.set_sensitive(False) #set all actions disabled
130+
for action in Actions.get_all_actions():
131+
action.set_sensitive(False) # set all actions disabled
135132
for action in (
136133
Actions.APPLICATION_QUIT, Actions.FLOW_GRAPH_NEW,
137134
Actions.FLOW_GRAPH_OPEN, Actions.FLOW_GRAPH_SAVE_AS,
@@ -150,6 +147,9 @@ def _handle_action(self, action, *args):
150147
action.set_sensitive(True)
151148
if hasattr(action, 'load_from_preferences'):
152149
action.load_from_preferences()
150+
if ParseXML.xml_failures:
151+
Messages.send_xml_errors_if_any(ParseXML.xml_failures)
152+
Actions.XML_PARSER_ERRORS_DISPLAY.set_sensitive(True)
153153

154154
elif action == Actions.APPLICATION_QUIT:
155155
if self.main_window.close_pages():

0 commit comments

Comments
 (0)