Skip to content

Commit

Permalink
Check functions and methods. Fix dropdown check
Browse files Browse the repository at this point in the history
  • Loading branch information
sevisal committed Oct 16, 2023
1 parent 46661a0 commit ceef1c4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/vai_lab/utils/plugins/pluginCanvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,15 +514,14 @@ def optionsWindow(self):
# Find functions defined for the module
plugin_meth_list = [meth[0] for meth in getmembers(plugin, isfunction) if meth[0][0] != '_']
# Find available methods for the model
model_meth_list = [meth[0] for meth in getmembers(self.model, ismethod) if meth[0][0] != '_']
model_meth_list = [meth[0] for meth in getmembers(self.model, ismethod) + getmembers(self.model, isfunction) if meth[0][0] != '_']
# List intersection
# TODO: use only methods from the model
set_2 = frozenset(model_meth_list)
meth_list = [x for x in plugin_meth_list if x in set_2]
except Exception as exc:
meth_list = []


self.meths_sort = []
self.method_inputData = {}
self.default_inputData = {}
Expand All @@ -540,8 +539,6 @@ def optionsWindow(self):
'resources',
'Assets',
'VAILabsIcon.ico'))))
# self.newWindow.geometry("350x400")


frame1 = tk.Frame(self.newWindow)
frame2 = tk.Frame(self.newWindow)
Expand Down Expand Up @@ -784,6 +781,7 @@ def on_changeOption(self, *args):
val[int(self.treecol[1:])-1] = new_val
self.tree.item(self.treerow, values=tuple([val[0], new_val]))
self.dropDown.destroy()
self.__dict__.pop('dropDown',None)
self.saved = False

def on_return(self, event):
Expand Down Expand Up @@ -851,6 +849,7 @@ def removewindow(self):
val[int(self.treecol[1:])-1] = new_val
self.tree.item(el, values=tuple([val[0], new_val]))
self.dropDown.destroy()
self.__dict__.pop('dropDown',None)
# Updates the modified options and removes the ones that are not
for f in self.tree.get_children():
for c in self.tree.get_children(f):
Expand Down

0 comments on commit ceef1c4

Please sign in to comment.