- made sure that the 'default' postprocessor file is always loaded first such that this name is always first in the GUI comboboxes

- added a class in GUIElements for a TextEdit box with line numbers and highlight
This commit is contained in:
Marius Stanciu
2019-11-14 12:24:49 +02:00
committed by Marius
parent dfbd4452a1
commit 175e2f7af2
6 changed files with 158 additions and 5 deletions

View File

@@ -1417,8 +1417,25 @@ class App(QtCore.QObject):
# ########################## LOAD POSTPROCESSORS ##############################
# #############################################################################
# a dictionary that have as keys the name of the postprocessor files and the value is the class from
# the postprocessor file
self.postprocessors = load_postprocessors(self)
# make sure that always the 'default' postprocessor is the first item in the dictionary
if 'default' in self.postprocessors.keys():
new_ppp_dict = dict()
# add the 'default' name first in the dict after removing from the postprocessor's dictionary
default_pp = self.postprocessors.pop('default')
new_ppp_dict['default'] = default_pp
# then add the rest of the keys
for name, val_class in self.postprocessors.items():
new_ppp_dict[name] = val_class
# and now put back the ordered dict with 'default' key first
self.postprocessors = new_ppp_dict
for name in list(self.postprocessors.keys()):
# 'Paste' postprocessors are to be used only in the Solder Paste Dispensing Tool
if name.partition('_')[0] == 'Paste':