Clear tileEntity inspector when no tile entity, use correct type for entity UUID label

This commit is contained in:
David Vierra 2015-03-18 23:44:16 -10:00
parent 09b2884086
commit 6f0deec967

View File

@ -45,7 +45,8 @@ class InspectorWidget(QtGui.QWidget):
self.tileEntity = self.editorSession.currentDimension.getTileEntity(pos)
if self.tileEntity is not None:
self.blockNBTEditor.setRootTag(self.tileEntity.raw_tag())
else:
self.blockNBTEditor.setRootTag(None)
self.removeTileEntityButton.setEnabled(self.tileEntity is not None)
def inspectEntity(self, entity):
@ -53,7 +54,7 @@ class InspectorWidget(QtGui.QWidget):
self.stackedWidget.setCurrentWidget(self.pageInspectEntity)
self.entityIDLabel.setText(entity.id)
try:
self.entityUUIDLabel.setText(entity.UUID)
self.entityUUIDLabel.setText(str(entity.UUID))
except KeyError:
self.entityUUIDLabel.setText(self.tr("(Not set)"))