Skip to content

Commit

Permalink
Merge pull request #735 from johnbintz/select-newly-added-world-item
Browse files Browse the repository at this point in the history
Select newly added world items, opening branches as necessary
  • Loading branch information
TheJackiMonster committed Feb 21, 2021
2 parents 5ec4ab6 + 5ca087a commit 13d1f1b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions manuskript/models/worldModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ def addItem(self, title=None, parent=None):
_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):
Expand Down

0 comments on commit 13d1f1b

Please sign in to comment.