From a1660ffbd5fc0715a84593880b73dadca464d66c Mon Sep 17 00:00:00 2001 From: kramo Date: Fri, 22 Dec 2023 19:25:14 +0100 Subject: [PATCH] Scroll to last segment even with tags --- hyperplane/path_bar.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hyperplane/path_bar.py b/hyperplane/path_bar.py index 4c37b36..53ade0e 100644 --- a/hyperplane/path_bar.py +++ b/hyperplane/path_bar.py @@ -113,16 +113,17 @@ def append( self.separators[path_segment] = sep self.segments.append(path_segment) - if self.tags: - return - segment = self.segments[-1] - segment.remove_css_class("inactive-segment") GLib.timeout_add( segment.get_transition_duration(), self.viewport.scroll_to, segment ) + if self.tags: + return + + segment.remove_css_class("inactive-segment") + try: self.segments[-2].add_css_class("inactive-segment") except IndexError: