Double clicking on the object label in the Project list view should select the object and take user to Selected tab.

This commit is contained in:
mquezada 2018-05-26 19:43:01 -04:00
parent 5d1f4338a4
commit fca9f0ca88
1 changed files with 4 additions and 1 deletions

View File

@ -70,7 +70,6 @@ class ObjectCollection():
self.model = QtGui.QStandardItemModel(self.view)
self.view.setModel(self.model)
self.model.itemChanged.connect(self.on_item_changed)
#self.view.setModel(self)
self.click_modifier = None
@ -164,6 +163,10 @@ class ObjectCollection():
# Create the model item to insert into the QListView
icon = QtGui.QIcon(self.icons[obj.kind])#self.icons["gerber"])
item = QtGui.QStandardItem(icon, name)
# Item is not editable, so that double click
# does not allow cell value modification.
item.setEditable(False)
# The item is checkable, to add the checkbox.
item.setCheckable(True)
if obj.options["plot"] == True:
item.setCheckState(2)#Qt.Checked)