Skip to content

Commit 0115ac6

Browse files
committed
Reorganize inspector
1 parent 29a01d2 commit 0115ac6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

editor/inspector.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,15 @@ def load(self, hierarchyItem):
6868
self.buffer = self.add_buffer("Select a GameObject in the Hiearchy tab to view its properties.")
6969
return
7070
self.gameObject = hierarchyItem.gameObject
71+
7172
main_section = self.add_section(self.gameObject)
7273
main_section.component = self.gameObject
74+
7375
name_input = main_section.add_value("name", self.props[0], self.gameObject.name)
7476
name_input.edited.connect(hierarchyItem.rename)
75-
tag_input = main_section.add_value("tag", self.props[1], self.gameObject.tag.tag)
77+
tag_input = main_section.add_value("tag", self.props[2], self.gameObject.tag.tag)
7678
tag_input.prevent_modify = True # temporarily until i implement tag dropdowns
79+
7780
for component in self.gameObject.components:
7881
section = self.add_section(component)
7982
for name, val in component.shown.items():

editor/views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
import pyunity as pyu
3-
from PyQt5.QtCore import QItemSelectionModel, QModelIndex, Qt
3+
# from PyQt5.QtCore import QItemSelectionModel, QModelIndex
4+
from PyQt5.QtCore import Qt
45
from PyQt5.QtGui import QIcon
56
from PyQt5.QtWidgets import *
67

0 commit comments

Comments
 (0)