Fix Inspect Entity list being editable
This commit is contained in:
parent
525ca96bac
commit
08d8561b20
@ -5,6 +5,7 @@ from __future__ import absolute_import, division, print_function, unicode_litera
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from PySide import QtGui
|
from PySide import QtGui
|
||||||
|
from PySide.QtCore import Qt
|
||||||
|
|
||||||
from mcedit2.editortools import EditorTool
|
from mcedit2.editortools import EditorTool
|
||||||
from mcedit2.ui.editortools.select_entity import Ui_selectEntityWidget
|
from mcedit2.ui.editortools.select_entity import Ui_selectEntityWidget
|
||||||
@ -68,8 +69,14 @@ class SelectEntityTool(EditorTool):
|
|||||||
tableWidget.setRowCount(len(self.selectedEntities))
|
tableWidget.setRowCount(len(self.selectedEntities))
|
||||||
for row, e in enumerate(self.selectedEntities):
|
for row, e in enumerate(self.selectedEntities):
|
||||||
pos = e.Position
|
pos = e.Position
|
||||||
tableWidget.setItem(row, 0, QtGui.QTableWidgetItem(e.id))
|
flags = Qt.ItemIsSelectable | Qt.ItemIsEnabled
|
||||||
tableWidget.setItem(row, 1, QtGui.QTableWidgetItem("%0.2f, %0.2f, %0.2f" % (pos[0], pos[1], pos[2])))
|
idItem = QtGui.QTableWidgetItem(e.id)
|
||||||
|
idItem.setFlags(flags)
|
||||||
|
posItem = QtGui.QTableWidgetItem("%0.2f, %0.2f, %0.2f" % (pos[0], pos[1], pos[2]))
|
||||||
|
posItem.setFlags(flags)
|
||||||
|
|
||||||
|
tableWidget.setItem(row, 0, idItem)
|
||||||
|
tableWidget.setItem(row, 1, posItem)
|
||||||
|
|
||||||
self.cellWasClicked(0, 0)
|
self.cellWasClicked(0, 0)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user