Skip to content

Commit e567f4b

Browse files
committed
update tests
1 parent d03cf5e commit e567f4b

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

devsimpy/DetachedFrame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def __init__(self, parent=None, ID=wx.NewIdRef(), title="", diagram=None, name="
106106
self.toggle_list = getTopLevelWindow().toggle_list
107107
else:
108108
sys.stdout.write(_('Alone mode for DetachedFrame: Connector buttons are not binded\n'))
109-
self.toggle_list = [wx.NewIdRef() for i in range(6)]
109+
self.toggle_list = [wx.NewIdRef() for i in range(7)]
110110

111111
self.tools = [ toolbar.AddTool(Menu.ID_SAVE, "", load_and_resize_image('save.png'), wx.NullBitmap, shortHelp=_('Save File') ,longHelp=_('Save the current diagram'), clientData=self.canvas),
112112
toolbar.AddTool(Menu.ID_SAVEAS, "", load_and_resize_image('save_as.png'), wx.NullBitmap, shortHelp=_('Save File As'), longHelp=_('Save the diagram with an another name'), clientData=self.canvas),

devsimpy/WizardGUI.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,6 @@ def __init__(self, *args, **kwargs):
389389
page1.add_stuff(bt2)
390390
# page1.add_stuff(btgpt)
391391

392-
print(is_detached_framed, parent, parent.GetTopLevelParent())
393392
### if left click on the DetachedFrame, port instance can be created
394393
if is_detached_framed:
395394
bt3 = wx.RadioButton(page1, wx.NewIdRef(), _('Input Port'))

devsimpy/plugins/state_trajectory.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -437,13 +437,15 @@ def UnConfig():
437437
global diagram
438438

439439
main = wx.GetApp().GetTopWindow()
440-
nb2 = main.GetDiagramNotebook()
441-
currentPage = nb2.GetCurrentPage()
442-
diagram = currentPage.diagram
443440

444-
lst = [a.label for a in [s for s in diagram.GetShapeList() if isinstance(s, CodeBlock)]]
441+
if hasattr(main, 'GetDiagramNotebook'):
442+
nb2 = main.GetDiagramNotebook()
443+
currentPage = nb2.GetCurrentPage()
444+
diagram = currentPage.diagram
445445

446-
for label in lst:
447-
shape = diagram.GetShapeByLabel(label)
448-
if hasattr(shape, 'state_trajectory'):
449-
del shape.state_trajectory
446+
lst = [a.label for a in [s for s in diagram.GetShapeList() if isinstance(s, CodeBlock)]]
447+
448+
for label in lst:
449+
shape = diagram.GetShapeByLabel(label)
450+
if hasattr(shape, 'state_trajectory'):
451+
del shape.state_trajectory

0 commit comments

Comments
 (0)