From 432631904799e72444457a85c3d6d4fa73c22eec Mon Sep 17 00:00:00 2001 From: Capocchi L Date: Thu, 23 Apr 2020 15:03:04 +0200 Subject: [PATCH 1/4] delete the vscode workspace file --- devsimpy-v4-py3.code-workspace | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 devsimpy-v4-py3.code-workspace diff --git a/devsimpy-v4-py3.code-workspace b/devsimpy-v4-py3.code-workspace deleted file mode 100644 index c70a6459..00000000 --- a/devsimpy-v4-py3.code-workspace +++ /dev/null @@ -1,14 +0,0 @@ -{ - "folders": [ - { - "path": "." - }, - { - "path": "C:\\Users\\Laurent\\Dropbox\\devsimpy\\py3x\\plugins" - }, - { - "path": "C:\\Users\\Laurent\\Documents\\Recherche\\sestopy" - } - ], - "settings": {} -} \ No newline at end of file From e63798052c18703d7506a31721ae84ec441b818f Mon Sep 17 00:00:00 2001 From: Capocchi L Date: Wed, 29 Apr 2020 17:21:52 +0200 Subject: [PATCH 2/4] bug fixe --- LibraryTree.py | 2 ++ Menu.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/LibraryTree.py b/LibraryTree.py index 4f2681c4..e5ecc077 100644 --- a/LibraryTree.py +++ b/LibraryTree.py @@ -41,6 +41,8 @@ from ImportLibrary import DeleteBox from Complexity import GetMacCabeMetric +from pubsub import pub + _ = wx.GetTranslation #---------------------------------------------------------------------------------------------------- diff --git a/Menu.py b/Menu.py index dc2d0097..6a3b9e47 100644 --- a/Menu.py +++ b/Menu.py @@ -715,7 +715,9 @@ def __init__(self, parent): InsertItem = self.InsertItem if wx.VERSION_STRING < '4.0' else self.Insert item = parent.GetSelection() - if parent.ItemHasChildren(item): + path = parent.GetItemPyData(item) + + if os.path.isdir(path): new_model = wx.MenuItem(self, ID_NEW_MODEL_LIB, _('New Model'), _('Add a new model to the selected library')) new_model.SetBitmap(wx.Bitmap(os.path.join(ICON_PATH_16_16, 'new.png'))) InsertItem(0, new_model) From 914b261ec4f82540aae09a74404b74420ce97512 Mon Sep 17 00:00:00 2001 From: Capocchi L Date: Fri, 1 May 2020 21:16:37 +0200 Subject: [PATCH 3/4] bug fixe --- Mixins/Savable.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mixins/Savable.py b/Mixins/Savable.py index 77973989..656e9f7f 100644 --- a/Mixins/Savable.py +++ b/Mixins/Savable.py @@ -52,7 +52,8 @@ from tempfile import gettempdir from Decorators import BuzyCursorNotification, StatusBarNotification, cond_decorator -from Utilities import itersubclasses, getTopLevelWindow +from Utilities import itersubclasses, getTopLevelWindow, NotificationMessage + from XMLModule import makeDEVSXML, getDiagramFromXMLSES from Join import makeJoin, makeDEVSConf from .Abstractable import Abstractable @@ -213,6 +214,7 @@ def Save(self, obj_dumped, fileName = None): mainW.tree.SortChildren(mainW.tree.root) except Exception as info: + NotificationMessage(_('Error'), _("Problem saving (during the zip handling): %s -- %s\n")%(str(fileName),info), parent=self, timeout=5) sys.stderr.write(_("Problem saving (during the zip handling): %s -- %s\n")%(str(fileName),info)) return False else: From 6ab972f39bbfdbc3b46a64c59e9cc52861d837ae Mon Sep 17 00:00:00 2001 From: Capocchi L Date: Tue, 5 May 2020 20:26:28 +0200 Subject: [PATCH 4/4] bug fixe --- Container.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Container.py b/Container.py index c99a0e46..0d98488a 100644 --- a/Container.py +++ b/Container.py @@ -2522,7 +2522,8 @@ def DiagramModified(self): for string,win in list(D.items()): printOnStatusBar(win.statusbar, {0:"%s %s"%(string ,_("modified")), 1:os.path.basename(diagram.last_name_saved), 2:''}) - win.FindWindowByName('tb').EnableTool(Menu.ID_SAVE, self.diagram.modify) + tb = win.GetToolBar() + tb.EnableTool(Menu.ID_SAVE, self.diagram.modify) ### def OnMotion(self, event):