Commit c6923f7f authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Update completion list when Process symbol is added

parent 432b6a2e
......@@ -2240,7 +2240,7 @@ class OG_MainWindow(QtGui.QMainWindow, object):
# Update the data dictionary
item = self.datadict.topLevelItem(0)
item.takeChildren() # remove old children
for name, sort in ast.dataview.viewitems():
for name, sort in sorted(ast.dataview.viewitems(), key=lambda (x,_): x):
new_item = QtGui.QTreeWidgetItem(item,
[name.replace('-', '_'),
......@@ -1050,6 +1050,16 @@ class Process(HorizontalSymbol):
super(Process, self).set_shape(width, height)
def update_completion_list(self, pr_text):
''' When text was entered, update completion list at block level '''
for each in CONTEXT.processes:
if unicode(self.text).lower() == each.inputString:
new_proc = ogAST.Process()
new_proc.processName = unicode(self.text).lower()
class Procedure(Process):
''' Procedure declaration symbol - Very similar to Process '''
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment