mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-17 03:12:27 +12:00
Add automatic goal count for outline folders
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
This commit is contained in:
parent
3481e40b4f
commit
995a78058c
|
@ -175,6 +175,15 @@ class OutlineFolder(OutlineItem):
|
|||
|
||||
return count
|
||||
|
||||
def goalCount(self) -> int:
|
||||
count = super().goalCount()
|
||||
|
||||
if self.goal is None:
|
||||
for item in self.items:
|
||||
count += item.goalCount()
|
||||
|
||||
return count
|
||||
|
||||
def load(self, _: bool = True):
|
||||
metadata, _ = self.file.loadMMD(True)
|
||||
OutlineItem.loadMetadata(self, metadata)
|
||||
|
|
Loading…
Reference in a new issue