Merge pull request #735 from johnbintz/select-newly-added-world-item

Select newly added world items, opening branches as necessary
This commit is contained in:
Tobias Frisch 2021-02-21 18:14:41 +01:00 committed by GitHub
commit 13d1f1bddd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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):