- in ObjectCollection class, made sure that renaming an object in Project View does not result in an empty name. If new name is blank the rename is cancelled.

- made ObjectCOllection.TreeItem() inherit KeySensitiveListVIew and implicitly QTreeView (in the hope that the theme applied on app will be applied on the tree items, too (for MacOs new DarkUI theme)
This commit is contained in:
Marius Stanciu 2019-04-30 12:51:21 +03:00 committed by Marius
parent b8495f06ca
commit ac64f56240
2 changed files with 9 additions and 4 deletions

View File

@ -118,13 +118,13 @@ class KeySensitiveListView(QtWidgets.QTreeView):
event.ignore()
class TreeItem:
class TreeItem(KeySensitiveListView):
"""
Item of a tree model
"""
def __init__(self, data, icon=None, obj=None, parent_item=None):
super(TreeItem, self).__init__(parent_item)
self.parent_item = parent_item
self.item_data = data # Columns string data
self.icon = icon # Decoration
@ -399,7 +399,7 @@ class ObjectCollection(QtCore.QAbstractItemModel):
if obj:
old_name = str(obj.options['name'])
new_name = str(data)
if old_name != new_name:
if old_name != new_name and new_name != '':
# rename the object
obj.options["name"] = str(data)

View File

@ -9,11 +9,16 @@ CAD program, and create G-Code for Isolation routing.
=================================================
30.04.2019
- in ObjectCollection class, made sure that renaming an object in Project View does not result in an empty name. If new name is blank the rename is cancelled.
- made ObjectCOllection.TreeItem() inherit KeySensitiveListVIew and implicitly QTreeView (in the hope that the theme applied on app will be applied on the tree items, too (for MacOs new DarkUI theme)
29.04.2019
- solved bug in Gerber Editor: the '0' aperture (the region aperture) had no size which created errors. Made the size to be zero.
- solved bug in editors: the canvas selection shape was not deleted on mouse release if the grid snap was OFF
- solved bug in Excellon Editor: when selecting a drill hole on canvas the selected row in the Tools Table was not the correct onw but the next highest row
- solved bug in Excellon Editor: when selecting a drill hole on canvas the selected row in the Tools Table was not the correct one but the next highest row
- finished the Silkscreen Tool but there are some limitations (some wires fragments from silkscreen are lost)
- solved the issue in Silkscreen Tool with losing some fragments of wires from silkscreen