- make sure that the annotation shapes are deleted on creation of a new project

- added folder for the Russian translation
- made sure that visibility for TextGroup is set only if index is not None in VisPyVisuals.TextGroup.visible() setter
- RELEASE 8.918
This commit is contained in:
Marius Stanciu 2019-06-08 21:36:34 +03:00
parent 24f9de8c16
commit 5f972ab85e
4 changed files with 32 additions and 15 deletions

View File

@ -5914,19 +5914,27 @@ class App(QtCore.QObject):
# Clear pool
self.clear_pool()
#delete shapes left drawn from mark shape_collections, if any
for obj in self.collection.get_list():
try:
obj.mark_shapes.enabled = False
obj.mark_shapes.clear(update=True)
except:
pass
# delete shapes left drawn from mark shape_collections, if any
if isinstance(obj, FlatCAMGerber):
try:
obj.mark_shapes.enabled = False
obj.mark_shapes.clear(update=True)
except AttributeError:
pass
# also delete annotation shapes, if any
elif isinstance(obj, FlatCAMCNCjob):
try:
obj.annotation.enabled = False
obj.annotation.clear(update=True)
except AttributeError:
pass
# tcl needs to be reinitialized, otherwise old shell variables etc remains
self.init_tcl()
self.delete_selection_shape()
self.collection.delete_all()
self.setup_component_editor()
@ -6119,7 +6127,7 @@ class App(QtCore.QObject):
filter = _filter_)
if filename == "":
self.inform.emit(_("[WARNING_NOTCL Open Config cancelled."))
self.inform.emit(_("[WARNING_NOTCL] Open Config cancelled."))
else:
self.open_config_file(filename)

View File

@ -583,6 +583,8 @@ class ObjectCollection(QtCore.QAbstractItemModel):
self.endRemoveRows()
self.app.plotcanvas.redraw()
if select_project:
# always go to the Project Tab after object deletion as it may be done with a shortcut key
self.app.ui.notebook.setCurrentWidget(self.app.ui.project_tab)

View File

@ -9,13 +9,19 @@ CAD program, and create G-Code for Isolation routing.
=================================================
8.06.2019
- make sure that the annotation shapes are deleted on creation of a new project
- added folder for the Russian translation
- made sure that visibility for TextGroup is set only if index is not None in VisPyVisuals.TextGroup.visible() setter
- RELEASE 8.918
7.06.2019
- fixed bug in ToolCutout where creating a cutout object geometry from another external isolation geometry failed
- fixed bug in cncjob TclCommand where the gcode could not be correctly generated due of missing bounds params in obj.options dict
- fixed a hardcoded tolerance in FlatCAMGeometry.generatecncjob() and in FlatCAMGeometry.mtool_gen_cncjob() to use the parameter from Preferences
- updated translations
- RELEASE 8.918
5.06.2019

View File

@ -437,12 +437,13 @@ class TextGroup(object):
:param value: bool
"""
self._visible = value
try:
self._collection.data[self._index]['visible'] = value
except KeyError:
print("VisPyVisuals.TextGroup.visible --> KeyError")
pass
self._collection.redraw()
if self._index:
try:
self._collection.data[self._index]['visible'] = value
except KeyError as e:
print("VisPyVisuals.TextGroup.visible --> KeyError --> %s" % str(e))
pass
self._collection.redraw()
class TextCollectionVisual(TextVisual):