From fca9f0ca88d4ff0b1e9b0d99619b7f8dcbfafdfd Mon Sep 17 00:00:00 2001 From: mquezada Date: Sat, 26 May 2018 19:43:01 -0400 Subject: [PATCH] Double clicking on the object label in the Project list view should select the object and take user to Selected tab. --- ObjectCollection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ObjectCollection.py b/ObjectCollection.py index a28e7afc..a4d8c32a 100644 --- a/ObjectCollection.py +++ b/ObjectCollection.py @@ -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)