Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Complexity.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ def GetMacCabeMetric(path):
### beware to use tab for devs code of models

L = [getattr(cls,fct) for fct in ('extTransition','intTransition','outputFnc') if hasattr(cls, fct)]

print(L)

source_list = list(map(inspect.getsource, L))
### when model is created, the transition functions are empty...
try:
source_list = list(map(inspect.getsource, L))
except Exception as info:
source_list = []

L_args = []

Expand Down
33 changes: 13 additions & 20 deletions PlotGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,11 @@ def __init__(self, parent=None, id=wx.NewIdRef(), title="Time Plotting"):
self.normalize = False
self.home = HOME_PATH

# self.sldh = wx.Slider(self, wx.NewIdRef(), 10, 0, 50, (-1, -1), (250, -1), wx.SL_AUTOTICKS | wx.SL_HORIZONTAL | wx.SL_LABELS)
# self.sldv = wx.Slider(self, wx.NewIdRef(), 10, 0, 50, (-1, -1), (50, 150), wx.SL_AUTOTICKS | wx.SL_VERTICAL | wx.SL_LABELS)

self.client = plot.PlotCanvas(self)
#self.client.pointLabelFunc(self.drawPointLabel)

self.InitUI()

def InitUI(self):
##Now Create the menu bar and items
self.mainmenu = wx.MenuBar()

Expand Down Expand Up @@ -186,34 +185,30 @@ def __init__(self, parent=None, id=wx.NewIdRef(), title="Time Plotting"):
self.Bind(wx.EVT_MENU,self.OnScrUp, scrUp)
self.Bind(wx.EVT_MENU,self.OnScrRt, scrRt)
self.Bind(wx.EVT_MENU,self.OnReset, reset)


self.client.canvas.Bind(wx.EVT_LEFT_DOWN, self.OnMouseLeftDown)
self.client.canvas.Bind(wx.EVT_MOTION, self.OnMotion)
self.Bind(wx.EVT_CLOSE, self.OnQuit)

### A status bar to tell people what's happening
self.CreateStatusBar(1)

### create tool bar
self.tb = self.BuildToolbar()
self.BuildToolbar()

vbox = wx.BoxSizer(wx.VERTICAL)
hbox = wx.BoxSizer(wx.HORIZONTAL)

hbox.Add(self.client, 1, wx.ALIGN_CENTRE)

vbox.Add(self.tb, 0, wx.EXPAND)
vbox.Add(hbox, 1, wx.ALIGN_CENTRE)

vbox.Add(self.client, 1, wx.EXPAND)

self.SetSizer(vbox)

self.client.canvas.Bind(wx.EVT_LEFT_DOWN, self.OnMouseLeftDown)
self.client.canvas.Bind(wx.EVT_MOTION, self.OnMotion)

self.Bind(wx.EVT_CLOSE, self.OnQuit)
self.Layout()

def BuildToolbar(self):
""" Create ToolBar
"""

tb = wx.ToolBar(self, style=wx.TB_HORIZONTAL|wx.NO_BORDER|wx.TB_FLAT)
tb = self.CreateToolBar()
#tb = wx.ToolBar(self, style=wx.TB_HORIZONTAL|wx.NO_BORDER|wx.TB_FLAT)
tb.SetToolBitmapSize((16,16))

zoomLabel, zoomId = self.enableZoom.GetItemLabelText(), self.enableZoom.GetId()
Expand Down Expand Up @@ -243,8 +238,6 @@ def BuildToolbar(self):

tb.Realize()

return tb

def OnMove(self, event):
event.Skip()

Expand Down
2 changes: 1 addition & 1 deletion PropertiesGridCtrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ def GetValue(self, row, col):

try:
return self.data[row][col][0] if isinstance(self.data[row][col], tuple) else self.data[row][col]
except IndexError:
except Exception as e:
return None

def SetValue(self, row, col, value):
Expand Down