def _load_settings(self):
config_file = ['conf (*.conf)', 'All files (*)']
file_name, used_filter = QFileDialog().getOpenFileName(caption='Select the GUI config file',
filter=';;'.join(config_file))
if file_name:
with open(file_name, 'r') as f:
try:
self._controller.apply_action(NewConfigAction(MapPlotConfig.from_yaml(f.read())))
except yaml.parser.ParserError:
pass
except yaml.scanner.ScannerError:
pass
except ValueError:
pass
评论列表
文章目录