Select newly added world items, opening branches as necessary

This commit is contained in:
John Bintz 2020-02-09 10:54:40 -05:00
parent 12defa8fa4
commit 5ca087a67d

View file

@ -136,6 +136,9 @@ class worldModel(QStandardItemModel):
_id = QStandardItem(self.getUniqueID())
row = [name, _id] + [QStandardItem() for i in range(2, len(World))]
parent.appendRow(row)
self.mw.treeWorld.setExpanded(self.selectedIndex(), True)
self.mw.treeWorld.setCurrentIndex(self.indexFromItem(name))
return name
def getUniqueID(self):