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
3 changes: 2 additions & 1 deletion Container.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 2 additions & 0 deletions LibraryTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
from ImportLibrary import DeleteBox
from Complexity import GetMacCabeMetric

from pubsub import pub

_ = wx.GetTranslation

#----------------------------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion Menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion Mixins/Savable.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
14 changes: 0 additions & 14 deletions devsimpy-v4-py3.code-workspace

This file was deleted.