sidebar: Don't set headers on child TagRows
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
f477f8f12a
commit
3362029123
|
@ -106,3 +106,9 @@ class ParentTagBox(TagBox):
|
|||
|
||||
def child_tag_removed(self, tag):
|
||||
self.bus.board(self.on_child_tag_removed, tag)
|
||||
|
||||
def header_func(self, cur, prev):
|
||||
if isinstance(cur, tagrow.ParentTagRow):
|
||||
if prev and not isinstance(prev, tagrow.ParentTagRow):
|
||||
prev = prev.tag.parent.widgets
|
||||
super().header_func(cur, prev)
|
||||
|
|
|
@ -161,3 +161,6 @@ class TestParentTagBox(unittest.TestCase):
|
|||
self.assertEqual(ptbox[0], tag.widgets)
|
||||
self.assertEqual(ptbox[1], tag1.widgets)
|
||||
self.assertEqual(ptbox[2], tag2.widgets)
|
||||
|
||||
self.assertIsNone(tag1.widgets.get_header())
|
||||
self.assertIsNone(tag2.widgets.get_header())
|
||||
|
|
Loading…
Reference in New Issue
Block a user