Update back/forward indicator on tab switches

This commit is contained in:
Florian Bruhin 2017-07-16 20:20:33 +02:00
parent 5c367e7ab2
commit ee1707c4d4
2 changed files with 5 additions and 0 deletions

View File

@ -34,6 +34,10 @@ class Backforward(textbase.TextBase):
self.setText('')
self.hide()
return
self.on_tab_changed(tab)
def on_tab_changed(self, tab):
"""Update the text based on the given tab."""
text = ''
if tab.history.can_go_back():
text += '<'

View File

@ -325,6 +325,7 @@ class StatusBar(QWidget):
self.url.on_tab_changed(tab)
self.prog.on_tab_changed(tab)
self.percentage.on_tab_changed(tab)
self.backforward.on_tab_changed(tab)
self.maybe_hide()
assert tab.private == self._color_flags.private