Fix weird crash in on_tab_changed
This commit is contained in:
parent
934b009fd0
commit
6d44cf1b6e
@ -67,6 +67,10 @@ class Progress(QProgressBar):
|
||||
@pyqtSlot(int)
|
||||
def on_tab_changed(self, tab):
|
||||
"""Set the correct value when the current tab changed."""
|
||||
if self is None:
|
||||
# This should never happen, but for some weird reason it does
|
||||
# sometimes.
|
||||
return
|
||||
self.setValue(tab.progress)
|
||||
if tab.load_status == LoadStatus.loading:
|
||||
self.show()
|
||||
|
Loading…
Reference in New Issue
Block a user