- when the selection is changed in the Project Tree the selection shape on canvas is deleted

- if an object is selected on Project Tree and it does not have the selection shape drawn, first click on canvas over it will draw the selection shape
This commit is contained in:
Marius Stanciu
2019-12-23 17:30:04 +02:00
parent cc303ce4f2
commit 98e246a5c4
4 changed files with 44 additions and 17 deletions

View File

@@ -787,6 +787,11 @@ class ObjectCollection(QtCore.QAbstractItemModel):
# FlatCAMApp.App.log.debug("Current: %s, Previous %s" % (str(current), str(previous)))
try:
# delete selection shape
self.app.delete_selection_shape()
for o in self.get_list():
o.selection_shape_drawn = False
obj = current.indexes()[0].internalPointer().obj
self.item_selected.emit(obj.options['name'])