Deregister screen-updates to the theme widget when it closes. Fixes #320.

This commit is contained in:
Tomas Groth 2020-02-03 23:03:24 +00:00 committed by Raoul Snyman
parent 4486b4b5a2
commit 442dc7d0d2
2 changed files with 3 additions and 1 deletions

View File

@ -15,7 +15,7 @@ environment:
install:
# Install dependencies from pypi
- "%PYTHON%\\python.exe -m pip install sqlalchemy alembic appdirs chardet beautifulsoup4 lxml Mako mysql-connector-python pytest mock pyodbc psycopg2 pypiwin32 websockets asyncio waitress six webob requests QtAwesome PyQt5 PyQtWebEngine pymediainfo PyMuPDF==1.16.7 QDarkStyle python-vlc Pyro4 zeroconf"
- "%PYTHON%\\python.exe -m pip install sqlalchemy alembic appdirs chardet beautifulsoup4 lxml Mako mysql-connector-python pytest mock pyodbc psycopg2 pypiwin32 websockets asyncio waitress six webob requests QtAwesome PyQt5 PyQtWebEngine pymediainfo PyMuPDF==1.16.7 QDarkStyle python-vlc Pyro4 zeroconf flask-cors"
build: off

View File

@ -308,6 +308,7 @@ class FirstTimeForm(QtWidgets.QWizard, UiFirstTimeWizard, RegistryProperties):
self.screen_selection_widget.save()
if self.theme_combo_box.currentIndex() != -1:
Settings().setValue('themes/global theme', self.theme_combo_box.currentText())
Registry().remove_function('config_screen_changed', self.screen_selection_widget.load)
super().accept()
def reject(self):
@ -326,6 +327,7 @@ class FirstTimeForm(QtWidgets.QWizard, UiFirstTimeWizard, RegistryProperties):
while any([not is_thread_finished(thread_name) for thread_name in self.thumbnail_download_threads]):
time.sleep(0.1)
self.application.set_normal_cursor()
Registry().remove_function('config_screen_changed', self.screen_selection_widget.load)
super().reject()
def _on_custom_button_clicked(self, which):