mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix indexing status not being updated when dialog is hidden and reshown
This commit is contained in:
parent
209b40d601
commit
6c755112b4
@ -88,6 +88,10 @@ class FTSDialog(Dialog):
|
||||
def sizeHint(self):
|
||||
return QSize(1000, 680)
|
||||
|
||||
def show(self):
|
||||
super().show()
|
||||
self.scan_status.startup()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from calibre.gui2 import Application
|
||||
|
@ -141,7 +141,8 @@ class ScanStatus(QWidget):
|
||||
self.enable_fts.toggled.connect(self.change_fts_state)
|
||||
self.indexing_status_timer = t = QTimer(self)
|
||||
t.timeout.connect(self.update_stats)
|
||||
t.start(1000)
|
||||
t.setInterval(1000)
|
||||
t.start()
|
||||
self.update_stats()
|
||||
|
||||
def update_stats(self):
|
||||
@ -198,6 +199,9 @@ class ScanStatus(QWidget):
|
||||
self.update_stats()
|
||||
self.apply_fts_state()
|
||||
|
||||
def startup(self):
|
||||
self.indexing_status_timer.start()
|
||||
|
||||
def shutdown(self):
|
||||
self.indexing_status_timer.stop()
|
||||
self.scan_progress.slow_button.setChecked(True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user