- fixed #315 where a script run with the --shellfile argument crashed the program if it contained a TclCommand New

- added messages in the Splash Screen when running FlatCAM with arguments at startup
This commit is contained in:
Marius Stanciu
2019-09-17 02:38:24 +03:00
committed by Marius
parent 9187004f9e
commit bd0c1da007
3 changed files with 96 additions and 52 deletions

View File

@@ -210,6 +210,8 @@ class ObjectCollection(QtCore.QAbstractItemModel):
QtCore.QAbstractItemModel.__init__(self)
self.app = app
# ## Icons for the list view
self.icons = {}
for kind in ObjectCollection.icon_files:
@@ -243,10 +245,8 @@ class ObjectCollection(QtCore.QAbstractItemModel):
# same as above only for objects that are plotted
self.plot_promises = set()
self.app = app
# ## View
self.view = KeySensitiveListView(app)
self.view = KeySensitiveListView(self.app)
self.view.setModel(self)
self.view.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
@@ -606,14 +606,6 @@ class ObjectCollection(QtCore.QAbstractItemModel):
def delete_all(self):
FlatCAMApp.App.log.debug(str(inspect.stack()[1][3]) + "--> OC.delete_all()")
self.beginResetModel()
self.checked_indexes = []
for group in self.root_item.child_items:
group.remove_children()
self.endResetModel()
self.app.plotcanvas.redraw()
self.app.all_objects_list.clear()
@@ -630,6 +622,14 @@ class ObjectCollection(QtCore.QAbstractItemModel):
self.app.film_tool.reset_fields()
self.beginResetModel()
self.checked_indexes = []
for group in self.root_item.child_items:
group.remove_children()
self.endResetModel()
def get_active(self):
"""
Returns the active object or None